fix: support NotShowIn
This commit is contained in:
parent
dc4e0edd73
commit
d40e9fa4e4
1 changed files with 12 additions and 2 deletions
|
|
@ -61,9 +61,14 @@ pub fn load_applications<'a>(
|
||||||
.filter_map(move |p| fde::DesktopEntry::from_path(p, Some(locales)).ok())
|
.filter_map(move |p| fde::DesktopEntry::from_path(p, Some(locales)).ok())
|
||||||
.filter(move |de| {
|
.filter(move |de| {
|
||||||
(include_no_display || !de.no_display())
|
(include_no_display || !de.no_display())
|
||||||
&& !only_show_in.zip(de.only_show_in()).is_some_and(
|
&& only_show_in.zip(de.only_show_in()).is_none_or(
|
||||||
|(xdg_current_desktop, only_show_in)| {
|
|(xdg_current_desktop, only_show_in)| {
|
||||||
!only_show_in.contains(&xdg_current_desktop)
|
only_show_in.contains(&xdg_current_desktop)
|
||||||
|
},
|
||||||
|
)
|
||||||
|
&& only_show_in.zip(de.not_show_in()).is_none_or(
|
||||||
|
|(xdg_current_desktop, not_show_in)| {
|
||||||
|
!not_show_in.contains(&xdg_current_desktop)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
@ -94,6 +99,11 @@ pub fn load_applications_for_app_ids<'a>(
|
||||||
) {
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if only_show_in.zip(de.not_show_in()).is_some_and(
|
||||||
|
|(xdg_current_desktop, not_show_in)| not_show_in.contains(&xdg_current_desktop),
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Search by ID first
|
// Search by ID first
|
||||||
app_ids
|
app_ids
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue