fix: sort other apps section
This commit is contained in:
parent
245dfaa9b0
commit
814b49114b
1 changed files with 10 additions and 4 deletions
14
src/app.rs
14
src/app.rs
|
|
@ -2302,14 +2302,20 @@ impl App {
|
|||
}
|
||||
|
||||
// Add other apps
|
||||
results.extend(
|
||||
self.mime_app_cache
|
||||
results.extend({
|
||||
let mut apps = self
|
||||
.mime_app_cache
|
||||
.apps()
|
||||
.iter()
|
||||
.filter(|mime_app| !mime_app.no_display)
|
||||
.filter(|&mime_app| dedupe.insert(&mime_app.id))
|
||||
.map(|mime_app| (mime_app, MimeAppMatch::Other)),
|
||||
);
|
||||
.map(|mime_app| (mime_app, MimeAppMatch::Other))
|
||||
.collect::<Vec<_>>();
|
||||
apps.sort_by(|(a, _), (b, _)| {
|
||||
crate::localize::LANGUAGE_SORTER.compare(&a.name, &b.name)
|
||||
});
|
||||
apps
|
||||
});
|
||||
|
||||
results
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue