aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/application.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2024-12-24 16:02:13 +0100
committerfiaxh <git@lightrise.org>2025-01-12 19:35:58 +0100
commit5ee322cbd987d36497522b82b876659e1d19da43 (patch)
treec22d0bdbf92b30207b64ec74e925af4263ce91fc /main/src/ui/application.vala
parentd78ec0562288fa4ed7d414d2269c00b7b8c2c588 (diff)
downloaddino-5ee322cbd987d36497522b82b876659e1d19da43.tar.gz
dino-5ee322cbd987d36497522b82b876659e1d19da43.zip
Contact details dialog: Add encryption tab
Diffstat (limited to 'main/src/ui/application.vala')
-rw-r--r--main/src/ui/application.vala14
1 files changed, 14 insertions, 0 deletions
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());