mirror of
https://github.com/elementary/gala.git
synced 2024-11-27 15:45:31 +03:00
notify: Dismiss notification after default action or app focus
This commit is contained in:
commit
94dbf4869d
@ -276,6 +276,8 @@ namespace Gala.Plugins.Notify
|
||||
for (var i = 0; i < notification_actions.length; i += 2) {
|
||||
if (notification_actions[i] == "default") {
|
||||
action_invoked (id, "default");
|
||||
dismiss ();
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -291,6 +293,8 @@ namespace Gala.Plugins.Notify
|
||||
workspace.activate_with_focus (window, time);
|
||||
else
|
||||
window.activate (time);
|
||||
|
||||
dismiss ();
|
||||
}
|
||||
}
|
||||
|
||||
@ -311,6 +315,12 @@ namespace Gala.Plugins.Notify
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
void dismiss ()
|
||||
{
|
||||
closed (id, NotificationClosedReason.DISMISSED);
|
||||
close ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user