feat: app list is working fairly well again

This commit is contained in:
Ashley Wulber 2022-07-20 16:17:43 -04:00
parent 2a8497fb2a
commit ab851fceef
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
13 changed files with 80 additions and 66 deletions

View file

@ -96,12 +96,22 @@ impl DockObject {
if let Some(app_info) = gio::DesktopAppInfo::new(path) {
if app_info.should_show()
&& Some(&first.app_id)
== app_info.filename().and_then(|p| p
.file_stem()
.and_then(|s| s.to_str().map(|s| s.to_string()))).as_ref()
== app_info
.filename()
.and_then(|p| {
p.file_stem().and_then(|s| {
s.to_str().map(|s| s.to_string())
})
})
.as_ref()
{
return Some(Object::new(&[("appinfo", &app_info), ("active", &results)])
.expect("Failed to create `DockObject`."));
return Some(
Object::new(&[
("appinfo", &app_info),
("active", &results),
])
.expect("Failed to create `DockObject`."),
);
}
}
}