From 5ee322cbd987d36497522b82b876659e1d19da43 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Tue, 24 Dec 2024 16:02:13 +0100 Subject: Contact details dialog: Add encryption tab --- main/src/ui/application.vala | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'main/src/ui/application.vala') diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala index 3c816a77..796146f8 100644 --- a/main/src/ui/application.vala +++ b/main/src/ui/application.vala @@ -145,6 +145,20 @@ public class Dino.Ui.Application : Adw.Application, Dino.Application { }); add_action(open_conversation_action); + SimpleAction open_conversation_details_action = new SimpleAction("open-conversation-details", new VariantType.tuple(new VariantType[]{VariantType.INT32, VariantType.STRING})); + open_conversation_details_action.activate.connect((variant) => { + int conversation_id = variant.get_child_value(0).get_int32(); + Conversation? conversation = stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation_by_id(conversation_id); + if (conversation == null) return; + + string stack_value = variant.get_child_value(1).get_string(); + + var conversation_details = ConversationDetails.setup_dialog(conversation, stream_interactor, window); + conversation_details.stack.visible_child_name = stack_value; + conversation_details.present(); + }); + add_action(open_conversation_details_action); + SimpleAction deny_subscription_action = new SimpleAction("deny-subscription", VariantType.INT32); deny_subscription_action.activate.connect((variant) => { Conversation? conversation = stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation_by_id(variant.get_int32()); -- cgit v1.2.3-70-g09d2