forked from Shinonome/dots-hyprland
waffle: bar: adjust desktop entry lookup interval & timeout
This commit is contained in:
@@ -16,12 +16,12 @@ AppButton {
|
|||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
// Retry looking up the desktop entry if it failed (e.g. database not loaded yet)
|
// Retry looking up the desktop entry if it failed (e.g. database not loaded yet)
|
||||||
property int retryCount: 0
|
property int retryCount: 5
|
||||||
interval: 500
|
interval: 1000
|
||||||
running: !root.isSeparator && root.desktopEntry === null && retryCount < 30
|
running: !root.isSeparator && root.desktopEntry === null && retryCount > 0
|
||||||
repeat: true
|
repeat: true
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
retryCount++;
|
retryCount--;
|
||||||
root.desktopEntry = DesktopEntries.heuristicLookup(root.appEntry.appId);
|
root.desktopEntry = DesktopEntries.heuristicLookup(root.appEntry.appId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user