aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_summary
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2018-09-11 14:41:51 +0200
committerfiaxh <git@mx.ax.lt>2018-09-12 00:32:17 +0200
commitbf2c78d1b720fff381b2a5a86bb154cffc0d7814 (patch)
treecd65d69370b7203f24690173df1d70d0c4032bed /main/src/ui/conversation_summary
parent83bf0631a5e3d1a17dde01a868edda487a46e68d (diff)
downloaddino-bf2c78d1b720fff381b2a5a86bb154cffc0d7814.tar.gz
dino-bf2c78d1b720fff381b2a5a86bb154cffc0d7814.zip
Fix presence subscription notification displaying
Diffstat (limited to 'main/src/ui/conversation_summary')
-rw-r--r--main/src/ui/conversation_summary/conversation_view.vala9
1 files changed, 9 insertions, 0 deletions
diff --git a/main/src/ui/conversation_summary/conversation_view.vala b/main/src/ui/conversation_summary/conversation_view.vala
index e6a564de..9a3e5902 100644
--- a/main/src/ui/conversation_summary/conversation_view.vala
+++ b/main/src/ui/conversation_summary/conversation_view.vala
@@ -132,14 +132,20 @@ public class ConversationView : Box, Plugins.ConversationItemCollection {
}
private void initialize_for_conversation_(Conversation? conversation) {
+ // Deinitialize old conversation
Dino.Application app = Dino.Application.get_default();
if (this.conversation != null) {
foreach (Plugins.ConversationItemPopulator populator in app.plugin_registry.conversation_addition_populators) {
populator.close(conversation);
}
}
+
+ // Clear data structures
+ clear_notifications();
this.conversation = conversation;
+
+ // Init for new conversation
foreach (Plugins.ConversationItemPopulator populator in app.plugin_registry.conversation_addition_populators) {
populator.init(conversation, this, Plugins.WidgetType.GTK);
}
@@ -378,6 +384,9 @@ public class ConversationView : Box, Plugins.ConversationItemCollection {
item_item_skeletons.clear();
widgets.clear();
main.@foreach((widget) => { widget.destroy(); });
+ }
+
+ private void clear_notifications() {
notifications.@foreach((widget) => { widget.destroy(); });
notification_revealer.transition_duration = 0;
notification_revealer.set_reveal_child(false);