Sort "other applications" in open with dialog (#1840)
Quick fix that sorts the other apps section. --- - [x] I have disclosed use of any AI generated code in my commit messages. - If you are using an LLM, and do not fully understand the changes it is making to the code base, do not create a PR. - In our experience, AI generated code often results in overly complex code that lacks enough context for a proper fix or feature inclusion. This results in considerably longer code reviews. Due to this, AI authored or partially authored PRs may be closed without comment. - [x] I understand these changes in full and will be able to respond to review comments. - [x] My change is accurately described in the commit message. - [x] My contribution is tested and working as described. - [x] I have read the [Developer Certificate of Origin](https://developercertificate.org/) and certify my contribution under its conditions.
This commit is contained in:
commit
d04c92229c
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