aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_content_view
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/conversation_content_view
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/conversation_content_view')
-rw-r--r--main/src/ui/conversation_content_view/conversation_item_skeleton.vala10
1 files changed, 3 insertions, 7 deletions
diff --git a/main/src/ui/conversation_content_view/conversation_item_skeleton.vala b/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
index 14fcd536..e4e6b804 100644
--- a/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
+++ b/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
@@ -132,19 +132,15 @@ public class ConversationItemSkeleton : Plugins.ConversationItemWidgetInterface,
ContentMetaItem ci = item as ContentMetaItem;
if (item.encryption != Encryption.NONE && item.encryption != Encryption.UNKNOWN && ci != null) {
string? icon_name = null;
- foreach(var e in app.plugin_registry.encryption_list_entries) {
- if (e.encryption == item.encryption) {
- icon_name = e.get_encryption_icon_name(conversation, ci.content_item);
- break;
- }
- }
+ var encryption_entry = app.plugin_registry.encryption_list_entries[item.encryption];
+ icon_name = encryption_entry.get_encryption_icon_name(conversation, ci.content_item);
encryption_image.icon_name = icon_name ?? "changes-prevent-symbolic";
encryption_image.visible = true;
}
if (item.encryption == Encryption.NONE) {
if (conversation.encryption != Encryption.NONE) {
- encryption_image.icon_name = "dino-changes-allowed-symbolic";
+ encryption_image.icon_name = "changes-allow-symbolic";
encryption_image.tooltip_text = Util.string_if_tooltips_active(_("Unencrypted"));
Util.force_error_color(encryption_image);
encryption_image.visible = true;