Don't set urgency hint on new messages on GNOME

This commit is contained in:
fiaxh 2019-06-22 01:58:52 +02:00
parent fa43581ad3
commit d429c30432

View file

@ -82,8 +82,13 @@ public class Notifications : Object {
} catch (Error e) { }
window.get_application().send_notification(conversation.id.to_string(), notifications[conversation]);
active_conversation_ids.add(conversation.id.to_string());
// Don't set urgency hint in GNOME, produces "Window is active" notification
var desktop_env = Environment.get_variable("XDG_CURRENT_DESKTOP");
if (desktop_env == null || !desktop_env.down().contains("gnome")) {
window.urgency_hint = true;
}
}
private async void notify_subscription_request(Conversation conversation) {
Notification notification = new Notification(_("Subscription request"));