diff --git a/qml/components/messageContent/MessageVideo.qml b/qml/components/messageContent/MessageVideo.qml
index 2ee9ec4..b7f0d54 100644
--- a/qml/components/messageContent/MessageVideo.qml
+++ b/qml/components/messageContent/MessageVideo.qml
@@ -218,7 +218,7 @@ MessageContentBase {
highlighted: videoMessageComponent.highlighted || down
visible: ( placeholderImage.status === Image.Ready && !videoMessageComponent.fullscreen ) ? true : false
onClicked: {
- pageStack.push(Qt.resolvedUrl("../../pages/VideoPage.qml"), {"videoData": videoData});
+ pageStack.push(Qt.resolvedUrl("../../pages/VideoPage.qml"), {"videoData": videoData, "sourceMessage": rawMessage});
}
}
}
@@ -464,7 +464,7 @@ MessageContentBase {
}
visible: ( videoComponentLoader.active && messageVideo.playbackState === MediaPlayer.PausedState ) ? true : false
onClicked: {
- pageStack.push(Qt.resolvedUrl("../../pages/VideoPage.qml"), {"videoData": videoData});
+ pageStack.push(Qt.resolvedUrl("../../pages/VideoPage.qml"), {"videoData": videoData, "sourceMessage": rawMessage});
}
}
}
diff --git a/qml/pages/VideoPage.qml b/qml/pages/VideoPage.qml
index ee4922d..c3089af 100644
--- a/qml/pages/VideoPage.qml
+++ b/qml/pages/VideoPage.qml
@@ -20,13 +20,18 @@ import QtQuick 2.6
import Sailfish.Silica 1.0
import QtMultimedia 5.6
import "../components"
+import "../components/messageContent"
import "../js/functions.js" as Functions
+import "../js/debug.js" as Debug
Page {
id: videoPage
allowedOrientations: Orientation.All
property var videoData;
+ property alias videoType: myVideoComponent.videoType
+ property alias isVideoNote: myVideoComponent.isVideoNote
+ property var sourceMessage;
property int videoWidth : videoData.width
property int videoHeight : videoData.height
@@ -42,8 +47,8 @@ Page {
function updateVideoData() {
if (typeof videoData === "object") {
- if (videoData.video.local.is_downloading_completed) {
- videoPage.videoUrl = videoData.video.local.path;
+ if (videoData[videoType].local.is_downloading_completed) {
+ videoPage.videoUrl = videoData[videoType].local.path;
}
}
}
@@ -55,7 +60,7 @@ Page {
id: videoPagePullDownMenu
visible: (videoPage.videoUrl !== "")
MenuItem {
- text: qsTr("Download Video")
+ text: qsTr("Copy video to gallery")
onClicked: {
tdLibWrapper.copyFileToDownloads(videoPage.videoUrl);
}
@@ -65,9 +70,8 @@ Page {
Connections {
target: tdLibWrapper
onFileUpdated: {
- if (fileId === videoPage.video.id) {
+ if (fileId === videoPage.videoData[videoType].id) {
if (fileInformation.local.is_downloading_completed) {
- videoPage.video = fileInformation;
videoPage.videoUrl = fileInformation.local.path;
videoPagePullDownMenu.visible = true;
}
@@ -87,10 +91,13 @@ Page {
height: videoPage.videoHeight * videoPage.sizingFactor
anchors.centerIn: parent
- VideoPreview {
+ MessageVideo {
+ id: myVideoComponent
videoData: videoPage.videoData
fullscreen: true
onScreen: videoPage.status === PageStatus.Active
+ rawMessage: sourceMessage
+ anchors.fill: parent
}
}
diff --git a/rpm/harbour-fernschreiber.spec b/rpm/harbour-fernschreiber.spec
index 288d1de..cf08d73 100644
--- a/rpm/harbour-fernschreiber.spec
+++ b/rpm/harbour-fernschreiber.spec
@@ -12,7 +12,7 @@ Name: harbour-fernschreiber
Summary: Fernschreiber is a Telegram client for Sailfish OS
Version: 0.7
-Release: 2
+Release: 3
Group: Qt/Qt
License: LICENSE
URL: http://werkwolf.eu/
diff --git a/rpm/harbour-fernschreiber.yaml b/rpm/harbour-fernschreiber.yaml
index 32ac71a..ce19853 100644
--- a/rpm/harbour-fernschreiber.yaml
+++ b/rpm/harbour-fernschreiber.yaml
@@ -1,7 +1,7 @@
Name: harbour-fernschreiber
Summary: Fernschreiber is a Telegram client for Sailfish OS
Version: 0.7
-Release: 2
+Release: 3
# The contents of the Group field should be one of the groups listed here:
# https://github.com/mer-tools/spectacle/blob/master/data/GROUPS
Group: Qt/Qt
diff --git a/translations/harbour-fernschreiber-de.ts b/translations/harbour-fernschreiber-de.ts
index 3d23001..e48ffc1 100644
--- a/translations/harbour-fernschreiber-de.ts
+++ b/translations/harbour-fernschreiber-de.ts
@@ -1664,10 +1664,6 @@
VideoPage
-
-
- Video herunterladen
-
Download von %1 erfolgreich.
@@ -1676,6 +1672,10 @@
Download fehlgeschlagen.
+
+
+ Video in die Galerie kopieren
+
VoiceNoteOverlay
diff --git a/translations/harbour-fernschreiber-en.ts b/translations/harbour-fernschreiber-en.ts
index e37a4f8..f565fee 100644
--- a/translations/harbour-fernschreiber-en.ts
+++ b/translations/harbour-fernschreiber-en.ts
@@ -1664,10 +1664,6 @@
VideoPage
-
-
- Download Video
-
Download of %1 successful.
@@ -1676,6 +1672,10 @@
Download failed.
+
+
+ Copy video to gallery
+
VoiceNoteOverlay
diff --git a/translations/harbour-fernschreiber-es.ts b/translations/harbour-fernschreiber-es.ts
index 1c03de4..db93556 100644
--- a/translations/harbour-fernschreiber-es.ts
+++ b/translations/harbour-fernschreiber-es.ts
@@ -1664,10 +1664,6 @@
VideoPage
-
-
- Bajar Vídeo
-
Bajada de %1 exitosa.
@@ -1676,6 +1672,10 @@
Error al bajar
+
+
+
+
VoiceNoteOverlay
diff --git a/translations/harbour-fernschreiber-fi.ts b/translations/harbour-fernschreiber-fi.ts
index ab59784..f9b573e 100644
--- a/translations/harbour-fernschreiber-fi.ts
+++ b/translations/harbour-fernschreiber-fi.ts
@@ -1665,10 +1665,6 @@
VideoPage
-
-
- Lataa video
-
Videon %1 lataus onnistui.
@@ -1677,6 +1673,10 @@
Lataus epäonnistui.
+
+
+
+
VoiceNoteOverlay
diff --git a/translations/harbour-fernschreiber-hu.ts b/translations/harbour-fernschreiber-hu.ts
index 3cf3ffd..4fb69dd 100644
--- a/translations/harbour-fernschreiber-hu.ts
+++ b/translations/harbour-fernschreiber-hu.ts
@@ -1637,10 +1637,6 @@
VideoPage
-
-
- Videó letöltése
-
A %1 letöltése sikerült.
@@ -1649,6 +1645,10 @@
A letöltés nem sikerült.
+
+
+
+
VoiceNoteOverlay
diff --git a/translations/harbour-fernschreiber-it.ts b/translations/harbour-fernschreiber-it.ts
index c7b1f48..ba88914 100644
--- a/translations/harbour-fernschreiber-it.ts
+++ b/translations/harbour-fernschreiber-it.ts
@@ -1664,10 +1664,6 @@
VideoPage
-
-
- Scarica video
-
Download di %1 completato.
@@ -1676,6 +1672,10 @@
Download non riuscito.
+
+
+
+
VoiceNoteOverlay
diff --git a/translations/harbour-fernschreiber-pl.ts b/translations/harbour-fernschreiber-pl.ts
index ea0cef3..2fc370f 100644
--- a/translations/harbour-fernschreiber-pl.ts
+++ b/translations/harbour-fernschreiber-pl.ts
@@ -1691,10 +1691,6 @@
VideoPage
-
-
- Pobierz film
-
Pobieranie %1 zakończone sukcesem
@@ -1703,6 +1699,10 @@
Nieudane pobieranie
+
+
+
+
VoiceNoteOverlay
diff --git a/translations/harbour-fernschreiber-ru.ts b/translations/harbour-fernschreiber-ru.ts
index 0148249..1b268e7 100644
--- a/translations/harbour-fernschreiber-ru.ts
+++ b/translations/harbour-fernschreiber-ru.ts
@@ -1691,10 +1691,6 @@
VideoPage
-
-
- Скачать видео
-
Успешно скачано %1.
@@ -1703,6 +1699,10 @@
Ошибка скачивания.
+
+
+
+
VoiceNoteOverlay
diff --git a/translations/harbour-fernschreiber-sk.ts b/translations/harbour-fernschreiber-sk.ts
index 8a0a3ac..5406d12 100644
--- a/translations/harbour-fernschreiber-sk.ts
+++ b/translations/harbour-fernschreiber-sk.ts
@@ -1691,10 +1691,6 @@
VideoPage
-
-
- Sťahovať video
-
Sťahovanie %1 bolo úspešné.
@@ -1703,6 +1699,10 @@
Sťahovanie zlyhalo.
+
+
+
+
VoiceNoteOverlay
diff --git a/translations/harbour-fernschreiber-sv.ts b/translations/harbour-fernschreiber-sv.ts
index c10829f..15f2fd3 100644
--- a/translations/harbour-fernschreiber-sv.ts
+++ b/translations/harbour-fernschreiber-sv.ts
@@ -1664,10 +1664,6 @@
VideoPage
-
-
- Ladda ner video
-
Nerladdning av %1 slutförd.
@@ -1676,6 +1672,10 @@
Nerladdning misslyckades.
+
+
+
+
VoiceNoteOverlay
diff --git a/translations/harbour-fernschreiber-zh_CN.ts b/translations/harbour-fernschreiber-zh_CN.ts
index 1c57c59..5a0416d 100644
--- a/translations/harbour-fernschreiber-zh_CN.ts
+++ b/translations/harbour-fernschreiber-zh_CN.ts
@@ -1637,10 +1637,6 @@
VideoPage
-
-
- 下载视频
-
已成功下载 %1 。
@@ -1649,6 +1645,10 @@
下载失败
+
+
+
+
VoiceNoteOverlay
diff --git a/translations/harbour-fernschreiber.ts b/translations/harbour-fernschreiber.ts
index 40662b9..a87b35c 100644
--- a/translations/harbour-fernschreiber.ts
+++ b/translations/harbour-fernschreiber.ts
@@ -1664,10 +1664,6 @@
VideoPage
-
-
- Download Video
-
Download of %1 successful.
@@ -1676,6 +1672,10 @@
Download failed.
+
+
+
+
VoiceNoteOverlay