fix: de fallback name check
This commit is contained in:
parent
cbda93a514
commit
6f6eeec0e7
2 changed files with 8 additions and 6 deletions
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
|
|
@ -41,6 +41,7 @@ jobs:
|
||||||
- winit_wgpu
|
- winit_wgpu
|
||||||
- wayland
|
- wayland
|
||||||
- applet
|
- applet
|
||||||
|
- desktop
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
|
|
|
||||||
|
|
@ -86,10 +86,11 @@ pub fn load_applications_for_app_ids<'a, 'b>(
|
||||||
app_ids.remove(i);
|
app_ids.remove(i);
|
||||||
true
|
true
|
||||||
// Fallback: If the name matches...
|
// Fallback: If the name matches...
|
||||||
} else if let Some(i) = app_ids
|
} else if let Some(i) = app_ids.iter().position(|id| {
|
||||||
.iter()
|
de.name(None)
|
||||||
.position(|id| id.to_lowercase().eq(&de.name().to_lowercase()))
|
.map(|n| n.to_lowercase() == id.to_lowercase())
|
||||||
{
|
.unwrap_or_default()
|
||||||
|
}) {
|
||||||
app_ids.remove(i);
|
app_ids.remove(i);
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -177,7 +178,7 @@ impl DesktopEntryData {
|
||||||
.categories()
|
.categories()
|
||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
.split_terminator(';')
|
.split_terminator(';')
|
||||||
.map(|x| x.to_string())
|
.map(std::string::ToString::to_string)
|
||||||
.collect(),
|
.collect(),
|
||||||
desktop_actions: de
|
desktop_actions: de
|
||||||
.actions()
|
.actions()
|
||||||
|
|
@ -235,5 +236,5 @@ where
|
||||||
|
|
||||||
cmd.envs(env_vars);
|
cmd.envs(env_vars);
|
||||||
|
|
||||||
crate::process::spawn(cmd)
|
crate::process::spawn(cmd);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue