fix(ags): prevent cancel drag when new notif or after delete anim

This commit is contained in:
matt1432 2023-09-14 14:57:50 -04:00
parent 4d0867cbf1
commit 4b3cdd82b9

View file

@ -33,13 +33,19 @@ const Header = () => Box({
const NotificationList = () => Box({ const NotificationList = () => Box({
vertical: true, vertical: true,
vexpand: true, vexpand: true,
connections: [[Notifications, box => { connections: [[Notifications, (box, id) => {
box.children = Notifications.notifications if (box.children.length == 0) {
.reverse() box.children = Notifications.notifications
.map(n => Notification(n)); .reverse()
.map(n => Notification(n));
}
else if (id) {
box.add(Notification(Notifications.getNotification(id)));
box.show_all();
}
box.visible = Notifications.notifications.length > 0; box.visible = Notifications.notifications.length > 0;
}]], }, 'notified']],
}); });
const Placeholder = () => Revealer({ const Placeholder = () => Revealer({