fix: column index desync after reorder
This commit is contained in:
@@ -3,6 +3,7 @@ pragma Singleton
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import ZShell.Config
|
||||
import ZShell.Services
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
@@ -88,6 +89,18 @@ Singleton {
|
||||
}
|
||||
]
|
||||
|
||||
readonly property var desktopEntries: DesktopEntries.applications.values.map(e => ({
|
||||
icon: e.icon,
|
||||
command: e.command
|
||||
}))
|
||||
|
||||
Component.onCompleted: {
|
||||
Processes.setDesktopEntries(root.desktopEntries);
|
||||
Qt.callLater(ensurePinnedFirst);
|
||||
}
|
||||
|
||||
onDesktopEntriesChanged: Processes.setDesktopEntries(root.desktopEntries)
|
||||
|
||||
readonly property string pinnedColumnId: "command"
|
||||
|
||||
readonly property var hiddenColumns: {
|
||||
@@ -113,8 +126,6 @@ Singleton {
|
||||
});
|
||||
}
|
||||
|
||||
Component.onCompleted: Qt.callLater(ensurePinnedFirst)
|
||||
|
||||
function defFor(id: string): var {
|
||||
for (const def of root.columnDefs)
|
||||
if (def.id === id)
|
||||
|
||||
Reference in New Issue
Block a user