diff options
author | fiaxh <git@lightrise.org> | 2020-12-30 20:22:14 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2020-12-30 20:30:35 +0100 |
commit | 99e98ac8d97296b0a34351d3bc8b155b0c8fc6db (patch) | |
tree | d5274576a0b7cb1257db52937e14e1b0e8a0f6bd /libdino/src/service | |
parent | c454bd904d1b9641ed333b71e206bd253fb9e9df (diff) | |
download | dino-99e98ac8d97296b0a34351d3bc8b155b0c8fc6db.tar.gz dino-99e98ac8d97296b0a34351d3bc8b155b0c8fc6db.zip |
Set window urgency hint independent of notification setting
fixes #960
Diffstat (limited to 'libdino/src/service')
-rw-r--r-- | libdino/src/service/notification_events.vala | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libdino/src/service/notification_events.vala b/libdino/src/service/notification_events.vala index d1e55113..7e99dcf9 100644 --- a/libdino/src/service/notification_events.vala +++ b/libdino/src/service/notification_events.vala @@ -10,10 +10,6 @@ public class NotificationEvents : StreamInteractionModule, Object { public string id { get { return IDENTITY.id; } } public signal void notify_content_item(ContentItem content_item, Conversation conversation); - public signal void notify_subscription_request(Conversation conversation); - public signal void notify_connection_error(Account account, ConnectionManager.ConnectionError error); - public signal void notify_muc_invite(Account account, Jid room_jid, Jid from_jid, string? password, string? reason); - public signal void notify_voice_request(Account account, Jid room_jid, Jid from_jid, string nick); private StreamInteractor stream_interactor; private NotificationProvider? notifier; @@ -77,7 +73,10 @@ public class NotificationEvents : StreamInteractionModule, Object { if (!highlight) return; } - notifier.notify_message.begin(message, conversation, conversation_display_name, participant_display_name); + notify_content_item(item, conversation); + if (notify != Conversation.NotifySetting.OFF) { + notifier.notify_message.begin(message, conversation, conversation_display_name, participant_display_name); + } break; case FileItem.TYPE: FileTransfer file_transfer = ((FileItem) item).file_transfer; @@ -87,7 +86,10 @@ public class NotificationEvents : StreamInteractionModule, Object { if (notify == Conversation.NotifySetting.HIGHLIGHT) return; if (file_transfer.direction == FileTransfer.DIRECTION_SENT) return; - notifier.notify_file.begin(file_transfer, conversation, is_image, conversation_display_name, participant_display_name); + notify_content_item(item, conversation); + if (notify != Conversation.NotifySetting.OFF) { + notifier.notify_file.begin(file_transfer, conversation, is_image, conversation_display_name, participant_display_name); + } break; } } |