cache icon

This commit is contained in:
Nova
2023-05-15 03:53:10 -04:00
parent 8bfd113752
commit 836f3d936f
3 changed files with 3 additions and 4 deletions

View File

@@ -255,15 +255,14 @@ impl DesktopFile {
print!("Cache miss")
}
// TODO: handle preferred_theme
if let Some(icon_path) = lookup(icon_name).with_size(preferred_px_size).find() {
if let Some(icon_path) = lookup(icon_name).with_size(preferred_px_size).with_cache().find() {
if let Some(icon) = Icon::from_path(icon_path, preferred_px_size) {
return Some(icon);
}
}
for icon_size in ICON_SIZES {
if let Some(icon_path) = lookup(icon_name).with_size(icon_size).find() {
if let Some(icon_path) = lookup(icon_name).with_size(icon_size).with_cache().find() {
if let Some(icon) = Icon::from_path(icon_path, preferred_px_size) {
return Some(icon);
}