aboutsummaryrefslogtreecommitdiff
path: root/libdino/src
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-01-15 23:44:15 +0100
committerfiaxh <git@lightrise.org>2020-01-17 20:47:33 +0100
commit7f21f898e0ec6efe5a8cf66053150e9a20ade53e (patch)
tree945ae6e170965bdd41c85d58a836bd30ab87e7b5 /libdino/src
parent41f98271660827be6528d275bbbbee43c216fbbf (diff)
downloaddino-7f21f898e0ec6efe5a8cf66053150e9a20ade53e.tar.gz
dino-7f21f898e0ec6efe5a8cf66053150e9a20ade53e.zip
Fix ConversationRow closing if animations are disabled
Diffstat (limited to 'libdino/src')
-rw-r--r--libdino/src/service/conversation_manager.vala2
-rw-r--r--libdino/src/service/muc_manager.vala5
2 files changed, 7 insertions, 0 deletions
diff --git a/libdino/src/service/conversation_manager.vala b/libdino/src/service/conversation_manager.vala
index c473ea77..3b48f154 100644
--- a/libdino/src/service/conversation_manager.vala
+++ b/libdino/src/service/conversation_manager.vala
@@ -126,6 +126,8 @@ public class ConversationManager : StreamInteractionModule, Object {
}
public void close_conversation(Conversation conversation) {
+ if (!conversation.active) return;
+
conversation.active = false;
conversation_deactivated(conversation);
}
diff --git a/libdino/src/service/muc_manager.vala b/libdino/src/service/muc_manager.vala
index 62d089e7..ab461701 100644
--- a/libdino/src/service/muc_manager.vala
+++ b/libdino/src/service/muc_manager.vala
@@ -33,6 +33,11 @@ public class MucManager : StreamInteractionModule, Object {
stream_interactor.account_added.connect(on_account_added);
stream_interactor.stream_negotiated.connect(on_stream_negotiated);
stream_interactor.get_module(MessageProcessor.IDENTITY).received_pipeline.connect(received_message_listener);
+ stream_interactor.get_module(ConversationManager.IDENTITY).conversation_deactivated.connect((conversation) => {
+ if (conversation.type_ == Conversation.Type.GROUPCHAT) {
+ part(conversation.account, conversation.counterpart);
+ }
+ });
}
public async Muc.JoinResult? join(Account account, Jid jid, string? nick, string? password) {