From 1cdec5d6877c79ef53e13f7220dc5701a34eb515 Mon Sep 17 00:00:00 2001 From: bbedward Date: Tue, 10 Feb 2026 17:40:41 -0500 Subject: [PATCH] launcher v2: add visibility guards --- quickshell/Common/AppUsageHistoryData.qml | 7 +++++++ quickshell/Modals/DankLauncherV2/Controller.qml | 5 +++++ quickshell/Modals/DankLauncherV2/LauncherContent.qml | 1 + 3 files changed, 13 insertions(+) diff --git a/quickshell/Common/AppUsageHistoryData.qml b/quickshell/Common/AppUsageHistoryData.qml index b608996a..1077f387 100644 --- a/quickshell/Common/AppUsageHistoryData.qml +++ b/quickshell/Common/AppUsageHistoryData.qml @@ -10,6 +10,7 @@ Singleton { id: root property var appUsageRanking: {} + property bool _saving: false Component.onCompleted: { loadSettings(); @@ -59,7 +60,9 @@ Singleton { } appUsageRanking = currentRanking; + _saving = true; saveSettings(); + _saving = false; } function getRankedApps() { @@ -97,7 +100,9 @@ Singleton { if (hasChanges) { appUsageRanking = currentRanking; + _saving = true; saveSettings(); + _saving = false; } } @@ -109,6 +114,8 @@ Singleton { blockWrites: true watchChanges: true onLoaded: { + if (root._saving) + return; parseSettings(settingsFile.text()); } onLoadFailed: error => {} diff --git a/quickshell/Modals/DankLauncherV2/Controller.qml b/quickshell/Modals/DankLauncherV2/Controller.qml index 0a266f95..57d16114 100644 --- a/quickshell/Modals/DankLauncherV2/Controller.qml +++ b/quickshell/Modals/DankLauncherV2/Controller.qml @@ -26,6 +26,7 @@ Item { property string activePluginId: "" property var collapsedSections: ({}) property bool keyboardNavigationActive: false + property bool active: false property var _modeSectionsCache: ({}) property bool _queryDrivenSearch: false property bool _diskCacheConsumed: false @@ -52,6 +53,8 @@ Item { Connections { target: AppSearchService function onCacheVersionChanged() { + if (!active) + return; _clearModeCache(); if (!searchQuery && searchMode === "all") performSearch(); @@ -61,6 +64,8 @@ Item { Connections { target: PluginService function onRequestLauncherUpdate(pluginId) { + if (!active) + return; if (activePluginId === pluginId) { if (activePluginCategories.length <= 1) loadPluginCategories(pluginId); diff --git a/quickshell/Modals/DankLauncherV2/LauncherContent.qml b/quickshell/Modals/DankLauncherV2/LauncherContent.qml index 2fd8d409..1444cbbd 100644 --- a/quickshell/Modals/DankLauncherV2/LauncherContent.qml +++ b/quickshell/Modals/DankLauncherV2/LauncherContent.qml @@ -86,6 +86,7 @@ FocusScope { Controller { id: controller + active: root.parentModal?.spotlightOpen ?? true viewModeContext: root.viewModeContext onItemExecuted: {