aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Lionel <lionel@les-miquelots.net>2024-01-29 01:29:54 +0100
committerMiquel Lionel <lionel@les-miquelots.net>2024-01-29 01:46:39 +0100
commit4f950d401b2feb799b20e3231e6f09b892614a8c (patch)
tree55e1ccdef0b27ca0b9fb50dc6ad0831fd85bd85e
parent7e3cedaf3fa347bfa688e71b0f69e62725db395d (diff)
downloaddino-4f950d401b2feb799b20e3231e6f09b892614a8c.tar.gz
dino-4f950d401b2feb799b20e3231e6f09b892614a8c.zip
Show type when hovering encrypted message icon, encrypted icon has separate color for OMEMO or PGP
This commit is adressing https://github.com/dino/dino/issues/1240: - If you hover the encryption icon on your messages if present, it should now say "This message is PGP encrypted" or "This message is OMEMO encrypted". - As a visual aid, the icon's color change accordingly. PGP is blue-ish, OMEMO is off green-ish. - NOTE: There's no color if your theme's 'changes-prevent-symbolic' icon is not a SVG.
-rw-r--r--main/src/ui/conversation_content_view/conversation_item_skeleton.vala8
1 files changed, 8 insertions, 0 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 5d86f6c7..5c71d4fb 100644
--- a/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
+++ b/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
@@ -154,6 +154,14 @@ public class ConversationItemSkeleton : Plugins.ConversationItemWidgetInterface,
if (encryption_entry != null) 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.OMEMO) {
+ encryption_image.tooltip_text = Util.string_if_tooltips_active(_("This message is OMEMO encrypted."));
+ Util.force_color(encryption_image, "#659E4F");
+ }
+ if (item.encryption == Encryption.PGP) {
+ encryption_image.tooltip_text = Util.string_if_tooltips_active(_("This message is PGP encrypted."));
+ Util.force_color(encryption_image, "#008BF0");
+ }
}
if (item.encryption == Encryption.NONE) {