diff options
author | fiaxh <git@lightrise.org> | 2022-08-21 00:10:59 +0200 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2022-08-21 14:16:31 +0200 |
commit | 054d3fec1627a9ee8d84d636d578aa68d3494d19 (patch) | |
tree | b01b7ab4be03d40ec24275de7cc31b21b76bc18b /main/src/ui/chat_input/chat_input_controller.vala | |
parent | d6afa6e8ff4cfb533140d9434b83f18f627f11ca (diff) | |
download | dino-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.vala | 6 |
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); } |