diff options
Diffstat (limited to 'main/src/ui/conversation_selector')
-rw-r--r-- | main/src/ui/conversation_selector/conversation_row.vala | 2 | ||||
-rw-r--r-- | main/src/ui/conversation_selector/list.vala | 15 |
2 files changed, 9 insertions, 8 deletions
diff --git a/main/src/ui/conversation_selector/conversation_row.vala b/main/src/ui/conversation_selector/conversation_row.vala index 2e7e321a..bb31b90d 100644 --- a/main/src/ui/conversation_selector/conversation_row.vala +++ b/main/src/ui/conversation_selector/conversation_row.vala @@ -12,7 +12,6 @@ namespace Dino.Ui.ConversationSelector { public abstract class ConversationRow : ListBoxRow { public signal void closed(); - public signal void disappeared(); [GtkChild] protected Image image; [GtkChild] private Label name_label; @@ -149,7 +148,6 @@ public abstract class ConversationRow : ListBoxRow { closed(); main_revealer.notify["child-revealed"].connect(() => { stream_interactor.get_module(ConversationManager.IDENTITY).close_conversation(conversation); - disappeared(); }); } diff --git a/main/src/ui/conversation_selector/list.vala b/main/src/ui/conversation_selector/list.vala index 3d6ee895..0e0ce554 100644 --- a/main/src/ui/conversation_selector/list.vala +++ b/main/src/ui/conversation_selector/list.vala @@ -23,19 +23,22 @@ public class List : ListBox { set_sort_func(sort); stream_interactor.get_module(ChatInteraction.IDENTITY).conversation_read.connect((conversation) => { - Idle.add(() => {if (rows.has_key(conversation)) rows[conversation].mark_read(); return false;}); + Idle.add(() => { if (rows.has_key(conversation)) rows[conversation].mark_read(); return false; }); }); stream_interactor.get_module(ChatInteraction.IDENTITY).conversation_unread.connect((conversation) => { - Idle.add(() => {if (rows.has_key(conversation)) rows[conversation].mark_unread(); return false;}); + Idle.add(() => { if (rows.has_key(conversation)) rows[conversation].mark_unread(); return false; }); }); stream_interactor.get_module(ConversationManager.IDENTITY).conversation_activated.connect((conversation) => { - Idle.add(() => {add_conversation(conversation); return false;}); + Idle.add(() => { add_conversation(conversation); return false; }); + }); + stream_interactor.get_module(ConversationManager.IDENTITY).conversation_deactivated.connect((conversation) => { + Idle.add(() => { remove_conversation(conversation); return false; }); }); stream_interactor.get_module(MessageProcessor.IDENTITY).message_received.connect((message, conversation) => { - Idle.add(() => {on_message_received(message, conversation); return false;}); + Idle.add(() => { on_message_received(message, conversation); return false; }); }); stream_interactor.get_module(MessageProcessor.IDENTITY).message_sent.connect((message, conversation) => { - Idle.add(() => {on_message_received(message, conversation); return false;}); + Idle.add(() => { on_message_received(message, conversation); return false; }); }); stream_interactor.get_module(PresenceManager.IDENTITY).show_received.connect((show, jid, account) => { Idle.add(() => { @@ -132,7 +135,6 @@ public class List : ListBox { rows[conversation] = row; add(row); row.closed.connect(() => { select_next_conversation(conversation); }); - row.disappeared.connect(() => { remove_conversation(conversation); }); row.main_revealer.set_reveal_child(true); } invalidate_sort(); @@ -156,6 +158,7 @@ public class List : ListBox { } private void remove_conversation(Conversation conversation) { + select_next_conversation(conversation); if (rows.has_key(conversation) && !conversation.active) { remove(rows[conversation]); rows.unset(conversation); |