mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-04 04:42:05 -04:00
launcher v2: add visibility guards
This commit is contained in:
@@ -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 => {}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -86,6 +86,7 @@ FocusScope {
|
||||
|
||||
Controller {
|
||||
id: controller
|
||||
active: root.parentModal?.spotlightOpen ?? true
|
||||
viewModeContext: root.viewModeContext
|
||||
|
||||
onItemExecuted: {
|
||||
|
||||
Reference in New Issue
Block a user