mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
fix(launcher): invalidate icon resolver cache on open to pick up newly installed app icons
This commit is contained in:
@@ -364,6 +364,8 @@ void LauncherPanel::onOpen(std::string_view context) {
|
||||
if (m_grid != nullptr) {
|
||||
m_grid->scrollView().setScrollOffset(0.0f);
|
||||
}
|
||||
// Clear cached icon misses before each open so newly installed app icons appear.
|
||||
m_iconResolver.invalidateCache();
|
||||
onInputChanged(initialValue);
|
||||
}
|
||||
|
||||
|
||||
@@ -392,6 +392,8 @@ namespace {
|
||||
|
||||
IconResolver::IconResolver() { rebuild(); }
|
||||
|
||||
void IconResolver::invalidateCache() { rebuild(); }
|
||||
|
||||
bool IconResolver::checkThemeChanged() {
|
||||
auto& state = iconThemeState();
|
||||
IconThemePlan next = buildThemePlan();
|
||||
|
||||
@@ -10,6 +10,7 @@ public:
|
||||
IconResolver();
|
||||
|
||||
const std::string& resolve(const std::string& iconName);
|
||||
void invalidateCache();
|
||||
|
||||
static bool checkThemeChanged();
|
||||
static std::uint64_t themeGeneration();
|
||||
|
||||
Reference in New Issue
Block a user