diff --git a/qml/components/LocationPreview.qml b/qml/components/LocationPreview.qml index 4eb234e..3d58f22 100644 --- a/qml/components/LocationPreview.qml +++ b/qml/components/LocationPreview.qml @@ -38,7 +38,11 @@ Item { Component.onCompleted: { updatePicture(); } - + function clicked(){ + if(!processLauncher.launchProgram('harbour-pure-maps', ["geo:"+locationData.latitude+","+locationData.longitude])) { + imageNotification.show(qsTr("Install Pure Maps to inspect this location.")); + } + } function updatePicture() { imagePreviewItem.pictureFileInformation = null; if (locationData) { @@ -95,20 +99,6 @@ Item { source: markerImage } } - - MouseArea { - anchors.fill: parent - onClicked: { - if(!processLauncher.launchProgram('harbour-pure-maps', ["geo:"+locationData.latitude+","+locationData.longitude])) { - imageNotification.show(qsTr("Install Pure Maps to inspect this location.")); - } - } - Rectangle { - anchors.fill: parent - color: Theme.rgba(Theme.highlightBackgroundColor, Theme.highlightBackgroundOpacity) - opacity: parent.pressed ? 1.0 : 0.0 - } - } } BackgroundImage { diff --git a/qml/components/VideoPreview.qml b/qml/components/VideoPreview.qml index daf7c65..6fd0996 100644 --- a/qml/components/VideoPreview.qml +++ b/qml/components/VideoPreview.qml @@ -38,6 +38,7 @@ Item { property bool onScreen: messageListItem ? messageListItem.page.status === PageStatus.Active : true; property string videoType : "video"; property bool playRequested: false; + signal clicked(); width: parent.width height: videoMessageComponent.isVideoNote ? width : Functions.getVideoHeight(width, videoData) @@ -287,6 +288,21 @@ Item { } } + Connections { + target: videoMessageComponent + onClicked: { + if (messageVideo.playbackState === MediaPlayer.PlayingState) { + enableScreensaver(); + messageVideo.pause(); + timeLeftItem.visible = true; + } else { + disableScreensaver(); + messageVideo.play(); + timeLeftTimer.start(); + } + } + } + Video { id: messageVideo @@ -344,20 +360,6 @@ Item { width: parent.width height: parent.height source: videoUrl - MouseArea { - anchors.fill: parent - onClicked: { - if (messageVideo.playbackState === MediaPlayer.PlayingState) { - enableScreensaver(); - messageVideo.pause(); - timeLeftItem.visible = true; - } else { - disableScreensaver(); - messageVideo.play(); - timeLeftTimer.start(); - } - } - } onStopped: { enableScreensaver(); messageVideo.visible = false;