app-list: Don't skip DesktopEntry if icon is missing
This commit is contained in:
parent
c16f761bc0
commit
353985170c
1 changed files with 10 additions and 9 deletions
|
|
@ -264,17 +264,18 @@ fn desktop_info_for_app_ids(mut app_ids: Vec<String>) -> Vec<DesktopInfo> {
|
||||||
.iter()
|
.iter()
|
||||||
.position(|s| s == de.appid || s.eq(&de.name(None).unwrap_or_default()))
|
.position(|s| s == de.appid || s.eq(&de.name(None).unwrap_or_default()))
|
||||||
{
|
{
|
||||||
freedesktop_icons::lookup(de.icon().unwrap_or(de.appid))
|
let icon = freedesktop_icons::lookup(de.icon().unwrap_or(de.appid))
|
||||||
.with_size(128)
|
.with_size(128)
|
||||||
.with_cache()
|
.with_cache()
|
||||||
.find()
|
.find();
|
||||||
.map(|buf| DesktopInfo {
|
|
||||||
id: app_ids.remove(i),
|
Some(DesktopInfo {
|
||||||
icon: buf,
|
id: app_ids.remove(i),
|
||||||
exec: de.exec().unwrap_or_default().to_string(),
|
icon: icon.unwrap_or_default(),
|
||||||
name: de.name(None).unwrap_or_default().to_string(),
|
exec: de.exec().unwrap_or_default().to_string(),
|
||||||
path: path.clone(),
|
name: de.name(None).unwrap_or_default().to_string(),
|
||||||
})
|
path: path.clone(),
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue