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.
This commit is contained in:
miruka 2020-10-03 02:50:43 -04:00
parent 6e2f3440d7
commit 3bfaee4758

View File

@ -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") :