diff options
author | fiaxh <git@lightrise.org> | 2019-11-24 14:02:45 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2019-11-24 14:59:48 +0100 |
commit | 7624f349dea57083a92b817351515d15fa3c5f41 (patch) | |
tree | 8f25503edf8f238535816c56b1e23a9619ff0887 /main/src/ui/add_conversation/conference_details_fragment.vala | |
parent | 10402f7b04da906e90165b5a86e7d259a89b8718 (diff) | |
download | dino-7624f349dea57083a92b817351515d15fa3c5f41.tar.gz dino-7624f349dea57083a92b817351515d15fa3c5f41.zip |
Fix join dialog when having been invited to a MUC
fixes #661
Diffstat (limited to 'main/src/ui/add_conversation/conference_details_fragment.vala')
-rw-r--r-- | main/src/ui/add_conversation/conference_details_fragment.vala | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/main/src/ui/add_conversation/conference_details_fragment.vala b/main/src/ui/add_conversation/conference_details_fragment.vala index 47cf228f..4fd1e608 100644 --- a/main/src/ui/add_conversation/conference_details_fragment.vala +++ b/main/src/ui/add_conversation/conference_details_fragment.vala @@ -10,6 +10,8 @@ namespace Dino.Ui { [GtkTemplate (ui = "/im/dino/Dino/add_conversation/conference_details_fragment.ui")] protected class ConferenceDetailsFragment : Box { + public signal void joined(); + public bool done { get { Jid? parsed_jid = Jid.parse(jid); @@ -55,6 +57,8 @@ protected class ConferenceDetailsFragment : Box { } } + public bool fragment_active { get; set; default=true; } + [GtkChild] private Stack accounts_stack; [GtkChild] private Button accounts_button; [GtkChild] private Label accounts_label; @@ -137,6 +141,8 @@ protected class ConferenceDetailsFragment : Box { } private async void on_ok_button_clicked() { + if (!fragment_active) return; + ok_button.label = _("Joining…"); ok_button.sensitive = false; @@ -144,7 +150,10 @@ protected class ConferenceDetailsFragment : Box { ok_button.label = _("Join"); ok_button.sensitive = true; - if (join_result == null || join_result.nick != null) return; + if (join_result == null || join_result.nick != null) { + joined(); + return; + } string label_text = ""; if (join_result.muc_error != null) { |