Commit 722278f3 authored by Erik Reider's avatar Erik Reider

Fixed swiping notification in CC delaying removal due to playing animation

parent fb9d0b01
...@@ -382,9 +382,10 @@ namespace SwayNotificationCenter { ...@@ -382,9 +382,10 @@ namespace SwayNotificationCenter {
urgent_notifications.clear (); urgent_notifications.clear ();
notification_ids.clear (); notification_ids.clear ();
// Skip animation if the notification was dismissed by swipe
bool dismissed_by_swipe = this.dismissed_by_swipe; bool dismissed_by_swipe = this.dismissed_by_swipe;
if (state == NotificationGroupState.SINLGE) { if (state == NotificationGroupState.SINLGE) {
unowned Notification ?noti = get_latest_notification (); unowned Notification ?noti = (Notification ?) group.get_first_widget ();
if (noti != null) { if (noti != null) {
dismissed_by_swipe |= noti.dismissed_by_swipe; dismissed_by_swipe |= noti.dismissed_by_swipe;
} }
...@@ -413,6 +414,7 @@ namespace SwayNotificationCenter { ...@@ -413,6 +414,7 @@ namespace SwayNotificationCenter {
ClosedReasons.DISMISSED); ClosedReasons.DISMISSED);
} }
/** Gets the latest, non-dismissed notification */
public unowned Notification ?get_latest_notification () { public unowned Notification ?get_latest_notification () {
return (Notification ?) group.get_first_widget ((widget) => { return (Notification ?) group.get_first_widget ((widget) => {
unowned Notification ?notification = (Notification ?) widget; unowned Notification ?notification = (Notification ?) widget;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment