aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/add_conversation
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-12-21 19:19:28 +0100
committerfiaxh <git@lightrise.org>2019-12-21 19:19:28 +0100
commit9ef4dddfdc40f515be6c780bf9fa089111590a74 (patch)
tree9173e13bc471d6c15fe5a1f1948ad61b7d4b8912 /main/src/ui/add_conversation
parent9565140f01cf95c42bc91aab21130bd1d06b0156 (diff)
downloaddino-9ef4dddfdc40f515be6c780bf9fa089111590a74.tar.gz
dino-9ef4dddfdc40f515be6c780bf9fa089111590a74.zip
Fix+improve conversation selection when joining channel or starting MUC PM
Diffstat (limited to 'main/src/ui/add_conversation')
-rw-r--r--main/src/ui/add_conversation/add_conference_dialog.vala2
-rw-r--r--main/src/ui/add_conversation/conference_details_fragment.vala6
2 files changed, 5 insertions, 3 deletions
diff --git a/main/src/ui/add_conversation/add_conference_dialog.vala b/main/src/ui/add_conversation/add_conference_dialog.vala
index ce88faec..ecafc9cc 100644
--- a/main/src/ui/add_conversation/add_conference_dialog.vala
+++ b/main/src/ui/add_conversation/add_conference_dialog.vala
@@ -9,8 +9,6 @@ namespace Dino.Ui {
public class AddConferenceDialog : Gtk.Dialog {
- public signal void conversation_opened(Conversation conversation);
-
private Stack stack = new Stack();
private Button cancel_button;
private Button ok_button;
diff --git a/main/src/ui/add_conversation/conference_details_fragment.vala b/main/src/ui/add_conversation/conference_details_fragment.vala
index d2ce75ab..38232633 100644
--- a/main/src/ui/add_conversation/conference_details_fragment.vala
+++ b/main/src/ui/add_conversation/conference_details_fragment.vala
@@ -146,11 +146,15 @@ protected class ConferenceDetailsFragment : Box {
ok_button.label = _("Joining…");
ok_button.sensitive = false;
- Muc.JoinResult? join_result = yield stream_interactor.get_module(MucManager.IDENTITY).join(account, new Jid(jid), nick, password);
+ Jid parsed_jid = new Jid(jid);
+ Muc.JoinResult? join_result = yield stream_interactor.get_module(MucManager.IDENTITY).join(account, parsed_jid, nick, password);
ok_button.label = _("Join");
ok_button.sensitive = true;
if (join_result == null || join_result.nick != null) {
+ Conversation conversation = stream_interactor.get_module(ConversationManager.IDENTITY).create_conversation(parsed_jid, account, Conversation.Type.GROUPCHAT);
+ Application app = GLib.Application.get_default() as Application;
+ app.controller.select_conversation(conversation);
joined();
return;
}