1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-14 09:42:10 -04:00

launcher: remove double loader

This commit is contained in:
bbedward
2026-02-16 12:17:46 -05:00
parent 466ff59573
commit 75a8c171ea
2 changed files with 7 additions and 11 deletions

View File

@@ -402,7 +402,6 @@ Item {
sourceComponent: LauncherContent { sourceComponent: LauncherContent {
focus: true focus: true
parentModal: root parentModal: root
heavyContentActive: !SettingsData.dankLauncherV2UnloadOnClose || spotlightOpen || isClosing
} }
onLoaded: { onLoaded: {

View File

@@ -12,11 +12,10 @@ FocusScope {
LayoutMirroring.childrenInherit: true LayoutMirroring.childrenInherit: true
property var parentModal: null property var parentModal: null
property bool heavyContentActive: true
property string viewModeContext: "spotlight" property string viewModeContext: "spotlight"
property alias searchField: searchField property alias searchField: searchField
property alias controller: controller property alias controller: controller
property var resultsList: resultsLoader.item property alias resultsList: resultsList
property alias actionPanel: actionPanel property alias actionPanel: actionPanel
property bool editMode: false property bool editMode: false
@@ -24,8 +23,7 @@ FocusScope {
property string editAppId: "" property string editAppId: ""
function resetScroll() { function resetScroll() {
if (resultsList) resultsList.resetScroll();
resultsList.resetScroll();
} }
function focusSearchField() { function focusSearchField() {
@@ -224,7 +222,7 @@ FocusScope {
return; return;
case Qt.Key_Menu: case Qt.Key_Menu:
case Qt.Key_F10: case Qt.Key_F10:
if (resultsList && contextMenu.hasContextMenuActions(controller.selectedItem)) { if (contextMenu.hasContextMenuActions(controller.selectedItem)) {
var scenePos = resultsList.getSelectedItemPosition(); var scenePos = resultsList.getSelectedItemPosition();
var localPos = root.mapFromItem(null, scenePos.x, scenePos.y); var localPos = root.mapFromItem(null, scenePos.x, scenePos.y);
showContextMenu(controller.selectedItem, localPos.x, localPos.y, true); showContextMenu(controller.selectedItem, localPos.x, localPos.y, true);
@@ -553,15 +551,14 @@ FocusScope {
} }
} }
Loader { Item {
id: resultsLoader
width: parent.width width: parent.width
height: parent.height - searchField.height - categoryRow.height - actionPanel.height - Theme.spacingXS * (categoryRow.visible ? 3 : 2) height: parent.height - searchField.height - categoryRow.height - actionPanel.height - Theme.spacingXS * (categoryRow.visible ? 3 : 2)
active: root.heavyContentActive
asynchronous: false
opacity: root.parentModal?.isClosing ? 0 : 1 opacity: root.parentModal?.isClosing ? 0 : 1
sourceComponent: ResultsList { ResultsList {
id: resultsList
anchors.fill: parent
controller: root.controller controller: root.controller
onItemRightClicked: (index, item, sceneX, sceneY) => { onItemRightClicked: (index, item, sceneX, sceneY) => {