aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/unified_window.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-03-24 22:57:05 +0100
committerfiaxh <git@mx.ax.lt>2017-03-31 01:21:35 +0200
commit7d2f995a097086be01426cc79c9c801dabaf9e3b (patch)
tree32b00adeaec82843a9f41fb3de17adc25e62fcc1 /main/src/ui/unified_window.vala
parent3733d24a9066bdd3e038d642a62cf642abd0b0bf (diff)
downloaddino-7d2f995a097086be01426cc79c9c801dabaf9e3b.tar.gz
dino-7d2f995a097086be01426cc79c9c801dabaf9e3b.zip
Fix conversation last_active
Diffstat (limited to 'main/src/ui/unified_window.vala')
-rw-r--r--main/src/ui/unified_window.vala18
1 files changed, 10 insertions, 8 deletions
diff --git a/main/src/ui/unified_window.vala b/main/src/ui/unified_window.vala
index 66a4a087..35f97d6e 100644
--- a/main/src/ui/unified_window.vala
+++ b/main/src/ui/unified_window.vala
@@ -51,14 +51,16 @@ public class UnifiedWindow : Window {
}
public void on_conversation_selected(Conversation conversation) {
- this.conversation = conversation;
- stream_interactor.get_module(ChatInteraction.IDENTITY).on_conversation_selected(conversation);
- conversation.active = true; // only for conversation_selected
- filterable_conversation_list.conversation_list.on_conversation_selected(conversation); // only for conversation_opened
-
- chat_input.initialize_for_conversation(conversation);
- conversation_frame.initialize_for_conversation(conversation);
- conversation_titlebar.initialize_for_conversation(conversation);
+ if (this.conversation == null || !this.conversation.equals(conversation)) {
+ this.conversation = conversation;
+ stream_interactor.get_module(ChatInteraction.IDENTITY).on_conversation_selected(conversation);
+ conversation.active = true; // only for conversation_selected
+ filterable_conversation_list.conversation_list.on_conversation_selected(conversation); // only for conversation_opened
+
+ chat_input.initialize_for_conversation(conversation);
+ conversation_frame.initialize_for_conversation(conversation);
+ conversation_titlebar.initialize_for_conversation(conversation);
+ }
}
private void setup_unified() {