From 4b3cdd82b98d6ddfece8f59883cb7d3d940fa3b1 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Thu, 14 Sep 2023 14:57:50 -0400 Subject: [PATCH] fix(ags): prevent cancel drag when new notif or after delete anim --- config/ags/js/notifications/center.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/config/ags/js/notifications/center.js b/config/ags/js/notifications/center.js index b2fac2e..149f335 100644 --- a/config/ags/js/notifications/center.js +++ b/config/ags/js/notifications/center.js @@ -33,13 +33,19 @@ const Header = () => Box({ const NotificationList = () => Box({ vertical: true, vexpand: true, - connections: [[Notifications, box => { - box.children = Notifications.notifications - .reverse() - .map(n => Notification(n)); + connections: [[Notifications, (box, id) => { + if (box.children.length == 0) { + box.children = Notifications.notifications + .reverse() + .map(n => Notification(n)); + } + else if (id) { + box.add(Notification(Notifications.getNotification(id))); + box.show_all(); + } box.visible = Notifications.notifications.length > 0; - }]], + }, 'notified']], }); const Placeholder = () => Revealer({