From 3bfaee4758e2baad0b6f64eabe9a7ca037fdafd8 Mon Sep 17 00:00:00 2001 From: miruka Date: Sat, 3 Oct 2020 02:50:43 -0400 Subject: [PATCH] Fix invisible "Copy link address" event menu entry menu.mediaType can be an enum value, which includes 0 to represent a web page link, or null if no link was right clicked. Check for null explicitely when evaluating whether the menu entry should be displayed. --- src/gui/Pages/Chat/Timeline/EventContextMenu.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/Pages/Chat/Timeline/EventContextMenu.qml b/src/gui/Pages/Chat/Timeline/EventContextMenu.qml index 14a59fed..029bb9d3 100644 --- a/src/gui/Pages/Chat/Timeline/EventContextMenu.qml +++ b/src/gui/Pages/Chat/Timeline/EventContextMenu.qml @@ -82,7 +82,7 @@ HMenu { HMenuItem { id: copyMedia icon.name: "copy-link" - visible: menu.mediaType && ! menu.isEncryptedMedia + visible: menu.mediaType !== null && ! menu.isEncryptedMedia text: ! visible ? "" : menu.mediaType === Utils.Media.File ? qsTr("Copy file address") :