diff options
author | fiaxh <git@mx.ax.lt> | 2017-09-19 22:41:33 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-09-19 23:39:17 +0200 |
commit | 8fdb38b99be9c588148d576c23212af765ff7302 (patch) | |
tree | 2971a06390d8499a19487c3832df994f1769f6ea /libdino/src/service/chat_interaction.vala | |
parent | 1f0df864453f4fd9c3d8ba2d90f3def26cbdf862 (diff) | |
download | dino-8fdb38b99be9c588148d576c23212af765ff7302.tar.gz dino-8fdb38b99be9c588148d576c23212af765ff7302.zip |
Use GNotification instead of libnotify
Diffstat (limited to 'libdino/src/service/chat_interaction.vala')
-rw-r--r-- | libdino/src/service/chat_interaction.vala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libdino/src/service/chat_interaction.vala b/libdino/src/service/chat_interaction.vala index 0aefc418..f08534aa 100644 --- a/libdino/src/service/chat_interaction.vala +++ b/libdino/src/service/chat_interaction.vala @@ -9,6 +9,8 @@ public class ChatInteraction : StreamInteractionModule, Object { public static ModuleIdentity<ChatInteraction> IDENTITY = new ModuleIdentity<ChatInteraction>("chat_interaction"); public string id { get { return IDENTITY.id; } } + public signal void focused_in(Conversation conversation); + public signal void focused_out(Conversation conversation); public signal void conversation_read(Conversation conversation); public signal void conversation_unread(Conversation conversation); @@ -77,6 +79,7 @@ public class ChatInteraction : StreamInteractionModule, Object { private void on_conversation_focused(Conversation? conversation) { focus_in = true; if (conversation == null) return; + focused_in(selected_conversation); conversation_read(selected_conversation); check_send_read(); selected_conversation.read_up_to = stream_interactor.get_module(MessageStorage.IDENTITY).get_last_message(conversation); @@ -85,6 +88,7 @@ public class ChatInteraction : StreamInteractionModule, Object { private void on_conversation_unfocused(Conversation? conversation) { focus_in = false; if (conversation == null) return; + focused_out(selected_conversation); if (last_input_interaction.has_key(conversation)) { send_chat_state_notification(conversation, Xep.ChatStateNotifications.STATE_PAUSED); last_input_interaction.unset(conversation); |