Open decrypted file in browser for crypt images

This commit is contained in:
miruka 2019-11-04 14:56:53 -04:00
parent ea0cda6aa8
commit 3c1d926188

View File

@ -20,18 +20,20 @@ HMxcImage {
property EventMediaLoader loader property EventMediaLoader loader
readonly property bool isEncrypted: ! Utils.isEmptyObject(cryptDict)
readonly property string openUrl: isEncrypted ? cachedPath : image.httpUrl
TapHandler { TapHandler {
onTapped: if (! image.animated) Qt.openUrlExternally(image.httpUrl) onTapped: if (! image.animated) Qt.openUrlExternally(openUrl)
onDoubleTapped: Qt.openUrlExternally(image.httpUrl) onDoubleTapped: Qt.openUrlExternally(openUrl)
} }
HoverHandler { HoverHandler {
id: hover id: hover
onHoveredChanged: onHoveredChanged:
eventDelegate.hoveredMediaTypeUrl = eventDelegate.hoveredMediaTypeUrl =
hovered ? [EventDelegate.Media.Image, image.httpUrl] : [] hovered ? [EventDelegate.Media.Image, openUrl] : []
} }
EventImageTextBubble { EventImageTextBubble {