Close notification popover on "notification-closed"

This commit is contained in:
Ian Douglas Scott 2021-09-14 12:34:45 -07:00
parent e9055e74d9
commit ec6a0ff366
2 changed files with 10 additions and 1 deletions

View file

@ -63,6 +63,11 @@ impl NotificationPopover {
notifications.connect_notification_recieved(clone!(@weak obj => move |notification| {
obj.handle_notification(&notification);
}));
notifications.connect_notification_closed(clone!(@weak obj => move |id| {
if obj.inner().notification_widget.id() == Some(id) {
obj.popdown();
}
}));
obj
}