notifpopups: replace notifications

Allow replacing
This commit is contained in:
2 * r + 2 * t 2025-01-15 00:01:31 +11:00
parent a53389c8b5
commit 67f4526a9a

View file

@ -148,7 +148,8 @@ export default () => (
const notification = notifd.get_notification(id);
const popup = (<NotifPopup notification={notification} />) as NotifPopup;
popup.connect("destroy", () => map.delete(notification.id));
popup.connect("destroy", () => map.get(notification.id) === popup && map.delete(notification.id));
map.get(notification.id)?.destroyWithAnims();
map.set(notification.id, popup);
self.add(