diff options
author | fiaxh <git@mx.ax.lt> | 2017-11-11 21:29:13 +0100 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-11-16 17:43:00 +0100 |
commit | 3f531d6b91edab6c79fa232143db828bad13853c (patch) | |
tree | 1083046c94e0b4a43cf16ac4a388fcea8ef91e84 /main/src/ui/conversation_summary | |
parent | 1d0745177e7a116455811dfd26e07b848cb89b75 (diff) | |
download | dino-3f531d6b91edab6c79fa232143db828bad13853c.tar.gz dino-3f531d6b91edab6c79fa232143db828bad13853c.zip |
Read+(write) stream async
Diffstat (limited to 'main/src/ui/conversation_summary')
3 files changed, 5 insertions, 9 deletions
diff --git a/main/src/ui/conversation_summary/chat_state_populator.vala b/main/src/ui/conversation_summary/chat_state_populator.vala index e491fe44..6f397249 100644 --- a/main/src/ui/conversation_summary/chat_state_populator.vala +++ b/main/src/ui/conversation_summary/chat_state_populator.vala @@ -21,12 +21,12 @@ class ChatStatePopulator : Plugins.ConversationItemPopulator, Object { stream_interactor.get_module(CounterpartInteractionManager.IDENTITY).received_state.connect((account, jid, state) => { if (current_conversation != null && current_conversation.account.equals(account) && current_conversation.counterpart.equals_bare(jid)) { - Idle.add(() => { update_chat_state(account, jid, state); return false; }); + update_chat_state(account, jid, state); } }); stream_interactor.get_module(MessageProcessor.IDENTITY).message_sent.connect((message, conversation) => { if (conversation.equals(current_conversation)) { - Idle.add(() => { update_chat_state(conversation.account, conversation.counterpart); return false; }); + update_chat_state(conversation.account, conversation.counterpart); } }); } diff --git a/main/src/ui/conversation_summary/conversation_item_skeleton.vala b/main/src/ui/conversation_summary/conversation_item_skeleton.vala index 03114227..1eb76840 100644 --- a/main/src/ui/conversation_summary/conversation_item_skeleton.vala +++ b/main/src/ui/conversation_summary/conversation_item_skeleton.vala @@ -39,7 +39,7 @@ public class ConversationItemSkeleton : Grid { } else { set_title_widget(widget); } - item.notify["mark"].connect_after(() => { Idle.add(() => { update_received(); return false; }); }); + item.notify["mark"].connect_after(update_received); update_received(); } diff --git a/main/src/ui/conversation_summary/message_populator.vala b/main/src/ui/conversation_summary/message_populator.vala index f6d55a92..dc4b5770 100644 --- a/main/src/ui/conversation_summary/message_populator.vala +++ b/main/src/ui/conversation_summary/message_populator.vala @@ -19,12 +19,8 @@ public class MessagePopulator : Object { app.plugin_registry.register_message_display(new SlashmeMessageDisplay(stream_interactor)); - stream_interactor.get_module(MessageProcessor.IDENTITY).message_received.connect((message, conversation) => { - Idle.add(() => { handle_message(message, conversation); return false; }); - }); - stream_interactor.get_module(MessageProcessor.IDENTITY).message_sent.connect((message, conversation) => { - Idle.add(() => { handle_message(message, conversation); return false; }); - }); + stream_interactor.get_module(MessageProcessor.IDENTITY).message_received.connect(handle_message); + stream_interactor.get_module(MessageProcessor.IDENTITY).message_sent.connect(handle_message); } public void init(Conversation conversation, Plugins.ConversationItemCollection item_collection) { |