mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 02:28:37 +02:00
fixed a lot of quickshell problems
This commit is contained in:
@@ -28,10 +28,15 @@ PanelWindow {
|
||||
|
||||
onNotification: notif => {
|
||||
notif.tracked = true;
|
||||
root.notifs = [...root.notifs, notif];
|
||||
}
|
||||
//root.notifs = [...root.notifs, notif]; // sometimes sent as null
|
||||
if (notif) {
|
||||
notif.tracked = true;
|
||||
root.notifs = [...root.notifs, notif];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
visible: stack.children.length != 0
|
||||
mask: Region {
|
||||
item: stack
|
||||
@@ -79,11 +84,13 @@ PanelWindow {
|
||||
notif: modelData
|
||||
|
||||
onDismissed: () => {
|
||||
if (notif) { //handles sometimes WARN scene: @notifs/Overlay.qml[82:-1]: TypeError: Cannot read property 'dismiss' of null
|
||||
modelData.dismiss();
|
||||
// Remove from list
|
||||
const index = root.notifs.indexOf(notif);
|
||||
if (index > -1)
|
||||
root.notifs.splice(index, 1);
|
||||
root.notifs.splice(index, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user