fix: Implement a limited retry mechanism for desktop entry lookups in app buttons.

This commit is contained in:
Akash
2026-02-16 21:44:13 +05:30
parent 8d52e83a59
commit fb1b674a30
2 changed files with 17 additions and 2 deletions
@@ -22,10 +22,12 @@ DockButton {
Timer {
// Retry looking up the desktop entry if it failed (e.g. database not loaded yet)
property int retryCount: 0
interval: 500
running: !root.isSeparator && root.desktopEntry === null
running: !root.isSeparator && root.desktopEntry === null && retryCount < 30
repeat: true
onTriggered: {
retryCount++;
root.desktopEntry = DesktopEntries.heuristicLookup(root.appToplevel.appId);
}
}