aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/chat_input/chat_input_controller.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2022-08-21 00:10:59 +0200
committerfiaxh <git@lightrise.org>2022-08-21 14:16:31 +0200
commit054d3fec1627a9ee8d84d636d578aa68d3494d19 (patch)
treeb01b7ab4be03d40ec24275de7cc31b21b76bc18b /main/src/ui/chat_input/chat_input_controller.vala
parentd6afa6e8ff4cfb533140d9434b83f18f627f11ca (diff)
downloaddino-054d3fec1627a9ee8d84d636d578aa68d3494d19.tar.gz
dino-054d3fec1627a9ee8d84d636d578aa68d3494d19.zip
Fix encryption button update and reduce its required GTK version
MenuButton.activate only exists since 4.4
Diffstat (limited to 'main/src/ui/chat_input/chat_input_controller.vala')
-rw-r--r--main/src/ui/chat_input/chat_input_controller.vala6
1 files changed, 4 insertions, 2 deletions
diff --git a/main/src/ui/chat_input/chat_input_controller.vala b/main/src/ui/chat_input/chat_input_controller.vala
index b60a17d4..7b260695 100644
--- a/main/src/ui/chat_input/chat_input_controller.vala
+++ b/main/src/ui/chat_input/chat_input_controller.vala
@@ -77,11 +77,13 @@ public class ChatInputController : Object {
chat_input.set_file_upload_active(active);
}
- private void on_encryption_changed(Plugins.EncryptionListEntry? encryption_entry) {
+ private void on_encryption_changed(Encryption encryption) {
reset_input_field_status();
- if (encryption_entry == null) return;
+ if (encryption == Encryption.NONE) return;
+ Application app = GLib.Application.get_default() as Application;
+ var encryption_entry = app.plugin_registry.encryption_list_entries[encryption];
encryption_entry.encryption_activated(conversation, set_input_field_status);
}