From d883172f1b8c3e6e8a4f96bb15c6f4a58ae63068 Mon Sep 17 00:00:00 2001 From: Amaro Lopes Date: Mon, 13 Oct 2025 16:56:38 -0300 Subject: [PATCH] Remove old sortedDesktopApplicatons --- Services/HyprlandService.qml | 35 +++++------------------------------ 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/Services/HyprlandService.qml b/Services/HyprlandService.qml index 736b156..5833c88 100644 --- a/Services/HyprlandService.qml +++ b/Services/HyprlandService.qml @@ -78,7 +78,6 @@ Singleton { function updateSortedDesktopApplications() { sortedDesktopApplicationsModel.clear(); - for (const topLevel of sortedTopLevels) { const entry = DesktopEntries.heuristicLookup(topLevel.wayland.appId); sortedDesktopApplicationsModel.append({ @@ -89,38 +88,14 @@ Singleton { } function workspaceApps(workspaceIndexAlign) { - const list = [] - const model = sortedDesktopApplicationsModel + const list = []; + const model = sortedDesktopApplicationsModel; for (let i = 0; i < model.count; i++) { - const item = model.get(i) + const item = model.get(i); if (item.topLevel.workspace.id === workspaceIndexAlign) - list.push(item.desktopEntry) + list.push(item.desktopEntry); } - return list - } - - property var sortedDesktopApplications: { - const sortedWayland = sortedTopLevels.map(topLevel => topLevel.wayland).filter(wayland => wayland !== null); - - const desktopEntries = sortedWayland.map(topLevel => { - return DesktopEntries.heuristicLookup(topLevel.appId); - }); - const workspace = sortedTopLevels.map(topLevel => { - return topLevel.workspace.id; - }); - const workspaceDesktopEntries = new Map(); - - for (let i = 0; i < workspace.length; i++) { - const key = workspace[i]; - const value = desktopEntries[i]; - - if (workspaceDesktopEntries.has(key)) { - workspaceDesktopEntries.get(key).push(value); - } else { - workspaceDesktopEntries.set(key, [value]); - } - } - return workspaceDesktopEntries; + return list; } Socket {