feat: resettable cache and icon retry after time

This commit is contained in:
Michael Aaron Murphy 2025-04-02 17:21:11 +02:00
parent a28483f3d1
commit 09a76900a6
No known key found for this signature in database
GPG key ID: B2732D4240C9212C
5 changed files with 63 additions and 17 deletions

View file

@ -1,13 +1,12 @@
use std::path::PathBuf;
use dirs::home_dir;
use once_cell::sync::Lazy;
use std::path::PathBuf;
use std::sync::LazyLock;
use xdg::BaseDirectories;
use crate::theme;
use crate::theme::error::ThemeError;
pub(crate) static BASE_PATHS: Lazy<Vec<PathBuf>> = Lazy::new(icon_theme_base_paths);
pub(crate) static BASE_PATHS: LazyLock<Vec<PathBuf>> = LazyLock::new(icon_theme_base_paths);
/// Look in $HOME/.icons (for backwards compatibility), in $XDG_DATA_DIRS/icons, in $XDG_DATA_DIRS/pixmaps and in /usr/share/pixmaps (in that order).
/// Paths that are not found are filtered out.