diff options
author | fiaxh <git@mx.ax.lt> | 2017-03-31 01:17:01 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-03-31 16:39:28 +0200 |
commit | 22adbd38dca0868f0e10754314a3859bba0a7d87 (patch) | |
tree | 44ecf9cf8af6aef78030dade95aecb1de2b99873 /main/src/ui/conversation_selector/list.vala | |
parent | 7d2f995a097086be01426cc79c9c801dabaf9e3b (diff) | |
download | dino-22adbd38dca0868f0e10754314a3859bba0a7d87.tar.gz dino-22adbd38dca0868f0e10754314a3859bba0a7d87.zip |
Handle MUC private messages
Diffstat (limited to 'main/src/ui/conversation_selector/list.vala')
-rw-r--r-- | main/src/ui/conversation_selector/list.vala | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/main/src/ui/conversation_selector/list.vala b/main/src/ui/conversation_selector/list.vala index dee70e4b..f580c4c5 100644 --- a/main/src/ui/conversation_selector/list.vala +++ b/main/src/ui/conversation_selector/list.vala @@ -39,8 +39,9 @@ public class List : ListBox { }); stream_interactor.get_module(PresenceManager.IDENTITY).show_received.connect((show, jid, account) => { Idle.add(() => { - Conversation? conversation = stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation(jid, account); - if (conversation != null && rows.has_key(conversation)) rows[conversation].on_show_received(show); + foreach (Conversation conversation in stream_interactor.get_module(ConversationManager.IDENTITY).get_conversations_for_presence(show, account)) { + if (rows.has_key(conversation)) rows[conversation].on_show_received(show); + } return false; }); }); @@ -123,6 +124,8 @@ public class List : ListBox { if (!rows.has_key(conversation)) { if (conversation.type_ == Conversation.Type.GROUPCHAT) { row = new GroupchatRow(stream_interactor, conversation); + } else if (conversation.type_ == Conversation.Type.GROUPCHAT_PM){ + row = new GroupchatPmRow(stream_interactor, conversation); } else { row = new ChatRow(stream_interactor, conversation); } @@ -186,6 +189,8 @@ public class List : ListBox { if (cr1 != null && cr2 != null) { Conversation c1 = cr1.conversation; Conversation c2 = cr2.conversation; + if (c1.last_active == null) return -1; + if (c2.last_active == null) return 1; int comp = c2.last_active.compare(c1.last_active); if (comp == 0) { return Util.get_conversation_display_name(stream_interactor, c1) |