aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/call_window/call_window_controller.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2021-05-03 13:17:17 +0200
committerfiaxh <git@lightrise.org>2021-05-11 12:52:00 +0200
commit90f9ecf62b2ebfef14de2874e7942552409632bf (patch)
treec9cd6da902ee89ab9cfcc435c2e98680e2ec3c50 /main/src/ui/call_window/call_window_controller.vala
parent8044b546d0ac15d34a3e6499b9c0d55d3d8f9c94 (diff)
downloaddino-90f9ecf62b2ebfef14de2874e7942552409632bf.tar.gz
dino-90f9ecf62b2ebfef14de2874e7942552409632bf.zip
Calls: Indicate whether OMEMO key is verified
Diffstat (limited to 'main/src/ui/call_window/call_window_controller.vala')
-rw-r--r--main/src/ui/call_window/call_window_controller.vala17
1 files changed, 16 insertions, 1 deletions
diff --git a/main/src/ui/call_window/call_window_controller.vala b/main/src/ui/call_window/call_window_controller.vala
index 7e5920ce..b07b41b1 100644
--- a/main/src/ui/call_window/call_window_controller.vala
+++ b/main/src/ui/call_window/call_window_controller.vala
@@ -78,7 +78,22 @@ public class Dino.Ui.CallWindowController : Object {
});
calls.encryption_updated.connect((call, audio_encryption, video_encryption, same) => {
if (!this.call.equals(call)) return;
- call_window.bottom_bar.set_encryption(audio_encryption, video_encryption, same);
+
+ string? title = null;
+ string? icon_name = null;
+ bool show_keys = true;
+ Plugins.Registry registry = Dino.Application.get_default().plugin_registry;
+ Plugins.CallEncryptionEntry? encryption_entry = audio_encryption != null ? registry.call_encryption_entries[audio_encryption.encryption_ns] : null;
+ if (encryption_entry != null) {
+ Plugins.CallEncryptionWidget? encryption_widgets = encryption_entry.get_widget(call.account, audio_encryption);
+ if (encryption_widgets != null) {
+ title = encryption_widgets.get_title();
+ icon_name = encryption_widgets.get_icon_name();
+ show_keys = encryption_widgets.show_keys();
+ }
+ }
+ call_window.bottom_bar.encryption_button.set_info(title, show_keys, audio_encryption, same ? null :video_encryption);
+ call_window.bottom_bar.encryption_button.set_icon(audio_encryption != null, icon_name);
});
own_video.resolution_changed.connect((width, height) => {