diff options
author | fiaxh <git@lightrise.org> | 2019-12-21 19:19:28 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2019-12-21 19:19:28 +0100 |
commit | 9ef4dddfdc40f515be6c780bf9fa089111590a74 (patch) | |
tree | 9173e13bc471d6c15fe5a1f1948ad61b7d4b8912 /main/src/ui/add_conversation | |
parent | 9565140f01cf95c42bc91aab21130bd1d06b0156 (diff) | |
download | dino-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.vala | 2 | ||||
-rw-r--r-- | main/src/ui/add_conversation/conference_details_fragment.vala | 6 |
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; } |