diff --git a/harbour-fernschreiber.pro b/harbour-fernschreiber.pro
index 7dfd861..13a2268 100644
--- a/harbour-fernschreiber.pro
+++ b/harbour-fernschreiber.pro
@@ -62,7 +62,6 @@ DISTFILES += qml/harbour-fernschreiber.qml \
qml/components/StickerPicker.qml \
qml/components/PhotoTextsListItem.qml \
qml/components/VoiceNoteOverlay.qml \
- qml/components/WebPagePreview.qml \
qml/components/chatInformationPage/ChatInformationEditArea.qml \
qml/components/chatInformationPage/ChatInformationPageContent.qml \
qml/components/chatInformationPage/ChatInformationProfilePicture.qml \
@@ -89,6 +88,20 @@ DISTFILES += qml/harbour-fernschreiber.qml \
qml/components/inlineQueryResults/InlineQueryResultVenue.qml \
qml/components/inlineQueryResults/InlineQueryResultVideo.qml \
qml/components/inlineQueryResults/InlineQueryResultVoiceNote.qml \
+ qml/components/messageContent/MessageAnimation.qml \
+ qml/components/messageContent/MessageAudio.qml \
+ qml/components/messageContent/MessageContentBase.qml \
+ qml/components/messageContent/MessageDocument.qml \
+ qml/components/messageContent/MessageGame.qml \
+ qml/components/messageContent/MessageLocation.qml \
+ qml/components/messageContent/MessagePhoto.qml \
+ qml/components/messageContent/MessagePoll.qml \
+ qml/components/messageContent/MessageSticker.qml \
+ qml/components/messageContent/MessageVenue.qml \
+ qml/components/messageContent/MessageVideoNote.qml \
+ qml/components/messageContent/MessageVideo.qml \
+ qml/components/messageContent/MessageVoiceNote.qml \
+ qml/components/messageContent/WebPagePreview.qml \
qml/js/debug.js \
qml/js/functions.js \
qml/pages/ChatInformationPage.qml \
diff --git a/qml/components/GamePreview.qml b/qml/components/GamePreview.qml
deleted file mode 100644
index 12551b1..0000000
--- a/qml/components/GamePreview.qml
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- Copyright (C) 2020 Sebastian J. Wolf and other contributors
-
- This file is part of Fernschreiber.
-
- Fernschreiber is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- Fernschreiber is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Fernschreiber. If not, see .
-*/
-import QtQuick 2.6
-import Sailfish.Silica 1.0
-import WerkWolf.Fernschreiber 1.0
-import "../js/functions.js" as Functions
-import "../js/twemoji.js" as Emoji
-
-Column {
- id: gamePreviewItem
-
- property ListItem messageListItem
- property MessageOverlayFlickable overlayFlickable
- property var rawMessage: messageListItem ? messageListItem.myMessage : overlayFlickable.overlayMessage
- property bool highlighted
-
- width: parent.width
- height: childrenRect.height
-
-
- Label {
- width: parent.width
- font.bold: true
- font.pixelSize: Theme.fontSizeSmall
- text: Emoji.emojify(rawMessage.content.game.title || "", font.pixelSize)
- truncationMode: TruncationMode.Fade
- textFormat: Text.StyledText
- wrapMode: Text.Wrap
- }
- Label {
- width: parent.width
- font.pixelSize: Theme.fontSizeExtraSmall
- text: Emoji.emojify(rawMessage.content.game.description || "", font.pixelSize)
- truncationMode: TruncationMode.Fade
- textFormat: Text.StyledText
- wrapMode: Text.Wrap
- }
- Label {
- width: parent.width
- font.pixelSize: Theme.fontSizeExtraSmall
- text: Emoji.emojify(Functions.enhanceMessageText(rawMessage.content.game.text) || "", font.pixelSize)
- truncationMode: TruncationMode.Fade
- wrapMode: Text.Wrap
- textFormat: Text.StyledText
- onLinkActivated: {
- var chatCommand = Functions.handleLink(link);
- if(chatCommand) {
- tdLibWrapper.sendTextMessage(chatInformation.id, chatCommand);
- }
- }
- }
- Item {
- width: parent.width
- height: Theme.paddingLarge
- }
-
- Image {
- id: thumbnail
- source: thumbnailFile.isDownloadingCompleted ? thumbnailFile.path : ""
- fillMode: Image.PreserveAspectCrop
- asynchronous: true
- visible: opacity > 0
- opacity: status === Image.Ready ? 1.0 : 0.0
-
- Behavior on opacity { FadeAnimation {} }
- layer.enabled: queryResultItem.pressed
- layer.effect: PressEffect { source: thumbnail }
-
- TDLibFile {
- id: thumbnailFile
- tdlib: tdLibWrapper
- autoLoad: true
- }
- Rectangle {
- width: Theme.iconSizeMedium
- height: width
- anchors {
- top: parent.top
- topMargin: Theme.paddingSmall
- left: parent.left
- leftMargin: Theme.paddingSmall
- }
-
- color: Theme.rgba(Theme.overlayBackgroundColor, 0.2)
- radius: Theme.paddingSmall
- Icon {
- id: icon
- source: "image://theme/icon-m-game-controller"
- asynchronous: true
- }
- }
- }
-
- Component.onCompleted: {
- if (rawMessage.content.game.photo) {
- // Check first which size fits best...
- var photo
- for (var i = 0; i < rawMessage.content.game.photo.sizes.length; i++) {
- photo = rawMessage.content.game.photo.sizes[i].photo
- if (rawMessage.content.game.photo.sizes[i].width >= gamePreviewItem.width) {
- break
- }
- }
- if (photo) {
- thumbnailFile.fileInformation = photo
- }
- }
- }
-}
diff --git a/qml/components/MessageListViewItem.qml b/qml/components/MessageListViewItem.qml
index 259caa2..1e81d59 100644
--- a/qml/components/MessageListViewItem.qml
+++ b/qml/components/MessageListViewItem.qml
@@ -18,6 +18,7 @@
*/
import QtQuick 2.6
import Sailfish.Silica 1.0
+import "./messageContent"
import "../js/twemoji.js" as Emoji
import "../js/functions.js" as Functions
import "../js/debug.js" as Debug
@@ -40,7 +41,7 @@ ListItem {
return existingMessage.id === messageId
});
readonly property bool isOwnMessage: page.myUserId === myMessage.sender.user_id
- property string extraContentComponentName
+ property bool hasContentComponent
highlighted: (down || isSelected) && !menuOpen
openMenuOnPressAndHold: !messageListItem.precalculatedValues.pageIsSelecting
@@ -199,17 +200,16 @@ ListItem {
repeat: false
running: false
onTriggered: {
- if (typeof myMessage.content !== "undefined") {
- if (messageListItem.extraContentComponentName !== "") {
- extraContentLoader.setSource(
- "../components/" +messageListItem.extraContentComponentName +".qml",
- {
- messageListItem: messageListItem
- })
- } else {
- if (typeof myMessage.content.web_page !== "undefined") { // only in messageText
- webPagePreviewLoader.active = true;
- }
+ if (messageListItem.hasContentComponent) {
+ var type = myMessage.content["@type"];
+ extraContentLoader.setSource(
+ "../components/messageContent/" + type.charAt(0).toUpperCase() + type.substring(1) + ".qml",
+ {
+ messageListItem: messageListItem
+ })
+ } else {
+ if (typeof myMessage.content.web_page !== "undefined") { // only in messageText
+ webPagePreviewLoader.active = true;
}
}
}
@@ -435,7 +435,7 @@ ListItem {
id: extraContentLoader
width: parent.width
asynchronous: true
- height: item ? item.height : (messageListItem.extraContentComponentName !== "" ? chatView.getContentComponentHeight(messageListItem.extraContentComponentName, myMessage.content, width) : 0)
+ height: item ? item.height : (messageListItem.hasContentComponent ? chatView.getContentComponentHeight(model.content_type, myMessage.content, width) : 0)
}
Binding {
diff --git a/qml/components/MessageOverlayFlickable.qml b/qml/components/MessageOverlayFlickable.qml
index f26ba00..ae2f2c3 100644
--- a/qml/components/MessageOverlayFlickable.qml
+++ b/qml/components/MessageOverlayFlickable.qml
@@ -18,6 +18,7 @@
*/
import QtQuick 2.6
import Sailfish.Silica 1.0
+import "./messageContent"
import "../js/functions.js" as Functions
import "../js/twemoji.js" as Emoji
import "../js/debug.js" as Debug
@@ -34,8 +35,7 @@ Flickable {
readonly property var userInformation: tdLibWrapper.getUserInformation(overlayMessage.sender.user_id);
readonly property bool isOwnMessage: tdLibWrapper.getUserInformation().id === overlayMessage.sender.user_id;
readonly property bool isAnonymous: overlayMessage.sender["@type"] === "messageSenderChat"
- readonly property string extraContentComponentName: (typeof overlayMessage.content !== "undefined" && typeof chatView.contentComponentNames[overlayMessage.content['@type']] !== "undefined" )
- ? chatView.contentComponentNames[overlayMessage.content['@type']] : ""
+ property bool hasContentComponent: overlayMessage.content && chatView.delegateMessagesContent.indexOf(overlayMessage.content['@type']) > -1
signal requestClose;
function getOriginalAuthor(forwardInformation, fontSize) {
@@ -61,18 +61,15 @@ Flickable {
repeat: false
running: false
onTriggered: {
- if (typeof overlayMessage.content !== "undefined") {
- if (messageOverlayFlickable.extraContentComponentName !== "") {
- overlayExtraContentLoader.setSource(
- "../components/" + messageOverlayFlickable.extraContentComponentName + ".qml",
- {
- overlayFlickable: messageOverlayFlickable
- })
- } else {
- if (typeof overlayMessage.content.web_page !== "undefined") {
- overlayWebPagePreviewLoader.active = true;
- }
- }
+ if (messageOverlayFlickable.hasContentComponent) {
+ var type = overlayMessage.content["@type"];
+ overlayExtraContentLoader.setSource(
+ "../components/messageContent/" + type.charAt(0).toUpperCase() + type.substring(1) + ".qml",
+ {
+ overlayFlickable: messageOverlayFlickable
+ })
+ } else if(overlayMessage.content && overlayMessage.content.web_page) {
+ overlayWebPagePreviewLoader.active = true;
}
}
}
diff --git a/qml/components/messageContent/MessageAnimation.qml b/qml/components/messageContent/MessageAnimation.qml
new file mode 100644
index 0000000..1177868
--- /dev/null
+++ b/qml/components/messageContent/MessageAnimation.qml
@@ -0,0 +1,21 @@
+/*
+ Copyright (C) 2020 Sebastian J. Wolf and other contributors
+
+ This file is part of Fernschreiber.
+
+ Fernschreiber is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Fernschreiber is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Fernschreiber. If not, see .
+*/
+import QtQuick 2.6
+
+MessageVideo {}
diff --git a/qml/components/AudioPreview.qml b/qml/components/messageContent/MessageAudio.qml
similarity index 97%
rename from qml/components/AudioPreview.qml
rename to qml/components/messageContent/MessageAudio.qml
index b8a7d17..38d6de6 100644
--- a/qml/components/AudioPreview.qml
+++ b/qml/components/messageContent/MessageAudio.qml
@@ -19,27 +19,21 @@
import QtQuick 2.6
import Sailfish.Silica 1.0
import QtMultimedia 5.6
-import "../js/functions.js" as Functions
-import "../js/debug.js" as Debug
+import "../"
+import "../../js/functions.js" as Functions
+import "../../js/debug.js" as Debug
-Item {
+MessageContentBase {
id: audioMessageComponent
- property ListItem messageListItem
- property MessageOverlayFlickable overlayFlickable
- property var rawMessage: messageListItem ? messageListItem.myMessage : overlayFlickable.overlayMessage
-
property var audioData: ( rawMessage.content['@type'] === "messageVoiceNote" ) ? rawMessage.content.voice_note : ( ( rawMessage.content['@type'] === "messageAudio" ) ? rawMessage.content.audio : "");
property string audioUrl;
property int previewFileId;
property int audioFileId;
property bool onScreen: messageListItem ? messageListItem.page.status === PageStatus.Active : true
property string audioType : "voiceNote";
- property bool highlighted;
- signal clicked();
- width: parent.width
height: width / 2
function getTimeString(rawSeconds) {
diff --git a/qml/components/messageContent/MessageContentBase.qml b/qml/components/messageContent/MessageContentBase.qml
new file mode 100644
index 0000000..f85bbfd
--- /dev/null
+++ b/qml/components/messageContent/MessageContentBase.qml
@@ -0,0 +1,32 @@
+/*
+ Copyright (C) 2020 Sebastian J. Wolf and other contributors
+
+ This file is part of Fernschreiber.
+
+ Fernschreiber is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Fernschreiber is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Fernschreiber. If not, see .
+*/
+import QtQuick 2.6
+import Sailfish.Silica 1.0
+import QtMultimedia 5.6
+import "../"
+import "../../js/functions.js" as Functions
+import "../../js/debug.js" as Debug
+
+Item {
+ property ListItem messageListItem
+ property MessageOverlayFlickable overlayFlickable
+ property var rawMessage: messageListItem ? messageListItem.myMessage : overlayFlickable.overlayMessage
+ property bool highlighted
+ signal clicked()
+}
diff --git a/qml/components/DocumentPreview.qml b/qml/components/messageContent/MessageDocument.qml
similarity index 94%
rename from qml/components/DocumentPreview.qml
rename to qml/components/messageContent/MessageDocument.qml
index fa1e7cf..12b6944 100644
--- a/qml/components/DocumentPreview.qml
+++ b/qml/components/messageContent/MessageDocument.qml
@@ -19,19 +19,13 @@
import QtQuick 2.6
import Sailfish.Silica 1.0
-Item {
+MessageContentBase {
id: documentPreviewItem
- width: parent.width
height: Theme.itemSizeLarge
- property ListItem messageListItem
- property MessageOverlayFlickable overlayFlickable
- property var rawMessage: messageListItem ? messageListItem.myMessage : overlayFlickable.overlayMessage
-
property var documentData: rawMessage.content.document
property bool openRequested: false;
- property bool highlighted;
Component.onCompleted: {
updateDocument();
@@ -128,7 +122,4 @@ Item {
}
}
}
-
-
-
}
diff --git a/qml/components/messageContent/MessageGame.qml b/qml/components/messageContent/MessageGame.qml
new file mode 100644
index 0000000..5711e63
--- /dev/null
+++ b/qml/components/messageContent/MessageGame.qml
@@ -0,0 +1,128 @@
+/*
+ Copyright (C) 2020 Sebastian J. Wolf and other contributors
+
+ This file is part of Fernschreiber.
+
+ Fernschreiber is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Fernschreiber is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Fernschreiber. If not, see .
+*/
+import QtQuick 2.6
+import Sailfish.Silica 1.0
+import WerkWolf.Fernschreiber 1.0
+import "../"
+import "../../js/functions.js" as Functions
+import "../../js/twemoji.js" as Emoji
+
+
+MessageContentBase {
+ id: messageContent
+ height: gamePreviewItem.height
+
+ Column {
+ id: gamePreviewItem
+ width: parent.width
+ height: childrenRect.height
+
+
+ Label {
+ width: parent.width
+ font.bold: true
+ font.pixelSize: Theme.fontSizeSmall
+ text: Emoji.emojify(rawMessage.content.game.title || "", font.pixelSize)
+ truncationMode: TruncationMode.Fade
+ textFormat: Text.StyledText
+ wrapMode: Text.Wrap
+ }
+ Label {
+ width: parent.width
+ font.pixelSize: Theme.fontSizeExtraSmall
+ text: Emoji.emojify(rawMessage.content.game.description || "", font.pixelSize)
+ truncationMode: TruncationMode.Fade
+ textFormat: Text.StyledText
+ wrapMode: Text.Wrap
+ }
+ Label {
+ width: parent.width
+ font.pixelSize: Theme.fontSizeExtraSmall
+ text: Emoji.emojify(Functions.enhanceMessageText(rawMessage.content.game.text) || "", font.pixelSize)
+ truncationMode: TruncationMode.Fade
+ wrapMode: Text.Wrap
+ textFormat: Text.StyledText
+ onLinkActivated: {
+ var chatCommand = Functions.handleLink(link);
+ if(chatCommand) {
+ tdLibWrapper.sendTextMessage(chatInformation.id, chatCommand);
+ }
+ }
+ }
+ Item {
+ width: parent.width
+ height: Theme.paddingLarge
+ }
+
+ Image {
+ id: thumbnail
+ source: thumbnailFile.isDownloadingCompleted ? thumbnailFile.path : ""
+ fillMode: Image.PreserveAspectCrop
+ asynchronous: true
+ visible: opacity > 0
+ opacity: status === Image.Ready ? 1.0 : 0.0
+ width: parent.width
+
+ Behavior on opacity { FadeAnimation {} }
+ layer.enabled: messageContent.highlighted
+ layer.effect: PressEffect { source: thumbnail }
+
+ TDLibFile {
+ id: thumbnailFile
+ tdlib: tdLibWrapper
+ autoLoad: true
+ }
+ Rectangle {
+ width: Theme.iconSizeMedium
+ height: width
+ anchors {
+ top: parent.top
+ topMargin: Theme.paddingSmall
+ left: parent.left
+ leftMargin: Theme.paddingSmall
+ }
+
+ color: Theme.rgba(Theme.overlayBackgroundColor, 0.2)
+ radius: Theme.paddingSmall
+ Icon {
+ id: icon
+ source: "image://theme/icon-m-game-controller"
+ asynchronous: true
+ }
+ }
+ }
+
+ Component.onCompleted: {
+ if (rawMessage.content.game.photo) {
+ // Check first which size fits best...
+ var photo
+ for (var i = 0; i < rawMessage.content.game.photo.sizes.length; i++) {
+ photo = rawMessage.content.game.photo.sizes[i].photo
+ if (rawMessage.content.game.photo.sizes[i].width >= gamePreviewItem.width) {
+ break
+ }
+ }
+ if (photo) {
+ thumbnailFile.fileInformation = photo
+ }
+ }
+ }
+ }
+
+}
diff --git a/qml/components/LocationPreview.qml b/qml/components/messageContent/MessageLocation.qml
similarity index 83%
rename from qml/components/LocationPreview.qml
rename to qml/components/messageContent/MessageLocation.qml
index fb4ec49..c6c46d7 100644
--- a/qml/components/LocationPreview.qml
+++ b/qml/components/messageContent/MessageLocation.qml
@@ -19,28 +19,23 @@
import QtQuick 2.6
import QtGraphicalEffects 1.0
import Sailfish.Silica 1.0
+import "../"
-Item {
+MessageContentBase {
id: imagePreviewItem
- property ListItem messageListItem
- property MessageOverlayFlickable overlayFlickable
- property var rawMessage: messageListItem ? messageListItem.myMessage : overlayFlickable.overlayMessage
- property bool highlighted
-
property var locationData : ( rawMessage.content['@type'] === "messageLocation" ) ? rawMessage.content.location : ( ( rawMessage.content['@type'] === "messageVenue" ) ? rawMessage.content.venue.location : "" )
property string chatId: rawMessage.chat_id
property var pictureFileInformation;
- width: parent.width
height: width / 2
property string fileExtra
Component.onCompleted: {
updatePicture();
}
- function clicked(){
+ onClicked: {
if(!processLauncher.launchProgram('harbour-pure-maps', ["geo:"+locationData.latitude+","+locationData.longitude])) {
imageNotification.show(qsTr("Install Pure Maps to inspect this location."));
}
@@ -56,17 +51,16 @@ Item {
Connections {
target: tdLibWrapper
onFileUpdated: {
- if(fileInformation["@extra"] !== imagePreviewItem.fileExtra) {
+ if(fileInformation["@extra"] !== imagePreviewItem.fileExtra && (!imagePreviewItem.pictureFileInformation || imagePreviewItem.pictureFileInformation.id !== fileInformation.id)) {
return;
}
-
- if(!imagePreviewItem.pictureFileInformation) {
- imagePreviewItem.pictureFileInformation = fileInformation;
- tdLibWrapper.downloadFile(imagePreviewItem.pictureFileInformation.id);
- } else if(imagePreviewItem.pictureFileInformation && fileInformation.id === imagePreviewItem.pictureFileInformation.id) {
- imagePreviewItem.pictureFileInformation = fileInformation;
+ if(fileInformation.local.is_downloading_completed) {
singleImage.source = fileInformation.local.path;
+ } else if(fileInformation.local.can_be_downloaded && !fileInformation.local.is_downloading_active) {
+ tdLibWrapper.downloadFile(fileInformation.id);
}
+
+ imagePreviewItem.pictureFileInformation = fileInformation;
}
}
diff --git a/qml/components/ImagePreview.qml b/qml/components/messageContent/MessagePhoto.qml
similarity index 88%
rename from qml/components/ImagePreview.qml
rename to qml/components/messageContent/MessagePhoto.qml
index 68dff15..e4e9c95 100644
--- a/qml/components/ImagePreview.qml
+++ b/qml/components/messageContent/MessagePhoto.qml
@@ -19,21 +19,17 @@
import QtQuick 2.6
import Sailfish.Silica 1.0
import WerkWolf.Fernschreiber 1.0
+import "../"
-Item {
+MessageContentBase {
id: imagePreviewItem
- property ListItem messageListItem
- property MessageOverlayFlickable overlayFlickable
- property var rawMessage: messageListItem ? messageListItem.myMessage : overlayFlickable.overlayMessage
readonly property int defaultHeight: Math.round(width * 2 / 3)
- property bool highlighted
- width: parent.width
height: singleImage.visible ? Math.min(defaultHeight, singleImage.bestHeight + Theme.paddingSmall) : defaultHeight
- function clicked() {
- pageStack.push(Qt.resolvedUrl("../pages/ImagePage.qml"), {
+ onClicked: {
+ pageStack.push(Qt.resolvedUrl("../../pages/ImagePage.qml"), {
"photoData" : imagePreviewItem.rawMessage.content.photo
})
}
diff --git a/qml/components/PollPreview.qml b/qml/components/messageContent/MessagePoll.qml
similarity index 96%
rename from qml/components/PollPreview.qml
rename to qml/components/messageContent/MessagePoll.qml
index 62e0971..d41e9ae 100644
--- a/qml/components/PollPreview.qml
+++ b/qml/components/messageContent/MessagePoll.qml
@@ -21,15 +21,13 @@ import QtQuick 2.6
import Sailfish.Silica 1.0
import WerkWolf.Fernschreiber 1.0
-import "../js/functions.js" as Functions
-import "../js/twemoji.js" as Emoji
+import "../../js/functions.js" as Functions
+import "../../js/twemoji.js" as Emoji
-Item {
+MessageContentBase {
id: pollMessageComponent
+ height: pollColumn.height
- property ListItem messageListItem
- property MessageOverlayFlickable overlayFlickable
- readonly property var rawMessage: messageListItem ? messageListItem.myMessage : overlayFlickable.overlayMessage
readonly property string chatId: rawMessage.chat_id
readonly property bool isOwnMessage: messageListItem ? messageListItem.isOwnMessage : overlayFlickable.isOwnMessage
readonly property string messageId: rawMessage.id
@@ -44,9 +42,6 @@ Item {
}
readonly property bool canAnswer: !hasAnswered && !pollData.is_closed
readonly property bool isQuiz: pollData.type['@type'] === "pollTypeQuiz"
- property bool highlighted
- width: parent.width
- height: pollColumn.height
property list extraContextMenuItems: [
NamedAction {
visible: !pollData.is_closed && pollMessageComponent.canEdit
@@ -264,7 +259,7 @@ Item {
visible: !pollMessageComponent.canAnswer && !pollData.is_anonymous && pollData.total_voter_count > 0
icon.source: "image://theme/icon-m-media-artists"
onClicked: {
- pageStack.push(Qt.resolvedUrl("../pages/PollResultsPage.qml"), { chatId:chatId, message:pollMessageComponent.message});
+ pageStack.push(Qt.resolvedUrl("../../pages/PollResultsPage.qml"), { chatId:chatId, message:pollMessageComponent.message});
}
Icon {
opacity: 0.8
diff --git a/qml/components/StickerPreview.qml b/qml/components/messageContent/MessageSticker.qml
similarity index 96%
rename from qml/components/StickerPreview.qml
rename to qml/components/messageContent/MessageSticker.qml
index 299780a..4b698c2 100644
--- a/qml/components/StickerPreview.qml
+++ b/qml/components/messageContent/MessageSticker.qml
@@ -19,18 +19,15 @@
import QtQuick 2.6
import Sailfish.Silica 1.0
import WerkWolf.Fernschreiber 1.0
+import "../"
-Item {
- property ListItem messageListItem
- property MessageOverlayFlickable overlayFlickable
-
+MessageContentBase {
readonly property var stickerData: messageListItem ? messageListItem.myMessage.content.sticker : overlayFlickable.overlayMessage.content.sticker;
readonly property bool animated: stickerData.is_animated && appSettings.animateStickers
readonly property bool stickerVisible: staticStickerLoader.item ? staticStickerLoader.item.visible :
animatedStickerLoader.item ? animatedStickerLoader.item.visible : false
readonly property bool isOwnSticker : messageListItem ? messageListItem.isOwnMessage : overlayFlickable.isOwnMessage
property real aspectRatio: stickerData.width / stickerData.height
- property bool highlighted
implicitWidth: stickerData.width
implicitHeight: stickerData.height
diff --git a/qml/components/messageContent/MessageVenue.qml b/qml/components/messageContent/MessageVenue.qml
new file mode 100644
index 0000000..9c04ae9
--- /dev/null
+++ b/qml/components/messageContent/MessageVenue.qml
@@ -0,0 +1,21 @@
+/*
+ Copyright (C) 2020 Sebastian J. Wolf and other contributors
+
+ This file is part of Fernschreiber.
+
+ Fernschreiber is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Fernschreiber is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Fernschreiber. If not, see .
+*/
+import QtQuick 2.6
+
+MessageLocation {}
diff --git a/qml/components/VideoPreview.qml b/qml/components/messageContent/MessageVideo.qml
similarity index 96%
rename from qml/components/VideoPreview.qml
rename to qml/components/messageContent/MessageVideo.qml
index 7854c2c..2ee9ec4 100644
--- a/qml/components/VideoPreview.qml
+++ b/qml/components/messageContent/MessageVideo.qml
@@ -19,16 +19,13 @@
import QtQuick 2.6
import Sailfish.Silica 1.0
import QtMultimedia 5.6
-import "../js/functions.js" as Functions
-import "../js/debug.js" as Debug
+import "../"
+import "../../js/functions.js" as Functions
+import "../../js/debug.js" as Debug
-Item {
+MessageContentBase {
id: videoMessageComponent
- property ListItem messageListItem
- property MessageOverlayFlickable overlayFlickable
- property var rawMessage: messageListItem ? messageListItem.myMessage : ( overlayFlickable ? overlayFlickable.overlayMessage : undefined )
-
property var videoData: ( rawMessage.content['@type'] === "messageVideo" ) ? rawMessage.content.video : ( ( rawMessage.content['@type'] === "messageAnimation" ) ? rawMessage.content.animation : rawMessage.content.video_note )
property string videoUrl;
property int previewFileId;
@@ -38,10 +35,7 @@ Item {
property bool onScreen: messageListItem ? messageListItem.page.status === PageStatus.Active : true;
property string videoType : "video";
property bool playRequested: false;
- property bool highlighted;
- signal clicked();
- width: parent.width
height: videoMessageComponent.isVideoNote ? width : Functions.getVideoHeight(width, videoData)
Timer {
@@ -215,7 +209,7 @@ Item {
height: Theme.iconSizeLarge
icon {
asynchronous: true
- source: "../../images/icon-l-fullscreen.svg"
+ source: "../../../images/icon-l-fullscreen.svg"
sourceSize {
width: Theme.iconSizeLarge
height: Theme.iconSizeLarge
@@ -224,7 +218,7 @@ Item {
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});
}
}
}
@@ -462,7 +456,7 @@ Item {
highlighted: videoMessageComponent.highlighted || down
icon {
asynchronous: true
- source: "../../images/icon-l-fullscreen.svg"
+ source: "../../../images/icon-l-fullscreen.svg"
sourceSize {
width: Theme.iconSizeLarge
height: Theme.iconSizeLarge
@@ -470,7 +464,7 @@ Item {
}
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});
}
}
}
diff --git a/qml/components/messageContent/MessageVideoNote.qml b/qml/components/messageContent/MessageVideoNote.qml
new file mode 100644
index 0000000..1177868
--- /dev/null
+++ b/qml/components/messageContent/MessageVideoNote.qml
@@ -0,0 +1,21 @@
+/*
+ Copyright (C) 2020 Sebastian J. Wolf and other contributors
+
+ This file is part of Fernschreiber.
+
+ Fernschreiber is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Fernschreiber is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Fernschreiber. If not, see .
+*/
+import QtQuick 2.6
+
+MessageVideo {}
diff --git a/qml/components/messageContent/MessageVoiceNote.qml b/qml/components/messageContent/MessageVoiceNote.qml
new file mode 100644
index 0000000..91b403e
--- /dev/null
+++ b/qml/components/messageContent/MessageVoiceNote.qml
@@ -0,0 +1,21 @@
+/*
+ Copyright (C) 2020 Sebastian J. Wolf and other contributors
+
+ This file is part of Fernschreiber.
+
+ Fernschreiber is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Fernschreiber is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Fernschreiber. If not, see .
+*/
+import QtQuick 2.6
+
+MessageAudio {}
diff --git a/qml/components/WebPagePreview.qml b/qml/components/messageContent/WebPagePreview.qml
similarity index 95%
rename from qml/components/WebPagePreview.qml
rename to qml/components/messageContent/WebPagePreview.qml
index a814b73..1072686 100644
--- a/qml/components/WebPagePreview.qml
+++ b/qml/components/messageContent/WebPagePreview.qml
@@ -20,7 +20,8 @@ import QtQuick 2.6
import QtGraphicalEffects 1.0
import Sailfish.Silica 1.0
import WerkWolf.Fernschreiber 1.0
-import "../js/functions.js" as Functions
+import "../"
+import "../../js/functions.js" as Functions
Column {
id: webPagePreviewColumn
@@ -132,7 +133,7 @@ Column {
MouseArea {
anchors.fill: parent
onClicked: {
- pageStack.push(Qt.resolvedUrl("../pages/ImagePage.qml"), { "photoData" : webPageData.photo, "pictureFileInformation" : picture.fileInformation });
+ pageStack.push(Qt.resolvedUrl("../../pages/ImagePage.qml"), { "photoData" : webPageData.photo, "pictureFileInformation" : picture.fileInformation });
}
}
}
diff --git a/qml/pages/ChatPage.qml b/qml/pages/ChatPage.qml
index 1747aae..30ec601 100644
--- a/qml/pages/ChatPage.qml
+++ b/qml/pages/ChatPage.qml
@@ -1056,39 +1056,53 @@ Page {
}
}
- readonly property var contentComponentNames: ({
- messageSticker: "StickerPreview",
- messagePhoto: "ImagePreview",
- messageVideo: "VideoPreview",
- messageVideoNote: "VideoPreview",
- messageAnimation: "VideoPreview",
- messageAudio: "AudioPreview",
- messageVoiceNote: "AudioPreview",
- messageDocument: "DocumentPreview",
- messageLocation: "LocationPreview",
- messageVenue: "LocationPreview",
- messagePoll: "PollPreview",
- messageGame: "GamePreview"
- })
- function getContentComponentHeight(componentName, content, parentWidth) {
- switch(componentName) {
- case "StickerPreview": return content.sticker.height;
- case "ImagePreview":
- case "LocationPreview":
- return parentWidth * 0.66666666; // 2 / 3;
- case "VideoPreview":
- return ( content['@type'] === "messageVideoNote" ) ? parentWidth : ( Functions.getVideoHeight(parentWidth, ( content['@type'] === "messageVideo" ) ? content.video : content.animation) );
- case "AudioPreview":
- return parentWidth / 2;
- case "DocumentPreview":
+ function getContentComponentHeight(contentType, content, parentWidth) {
+ switch(contentType) {
+ case "messageAnimation":
+ return Functions.getVideoHeight(parentWidth, content.video);
+ case "messageAudio":
+ case "messageVoiceNote":
+ return Theme.itemSizeLarge;
+ case "messageDocument":
return Theme.itemSizeSmall;
- case "PollPreview":
- return Theme.itemSizeSmall * (4 + content.poll.options);
- case "GamePreview":
+ case "messageGame":
return parentWidth * 0.66666666 + Theme.itemSizeLarge; // 2 / 3;
+ case "messageLocation":
+ case "messagePhoto":
+ case "messageVenue":
+ return parentWidth * 0.66666666; // 2 / 3;
+ case "messagePoll":
+ return Theme.itemSizeSmall * (4 + content.poll.options);
+ case "messageSticker":
+ return content.sticker.height;
+ case "messageVideo":
+ return Functions.getVideoHeight(parentWidth, content.video);
+ case "messageVideoNote":
+ return parentWidth
}
}
+ readonly property var delegateMessagesContent: [
+ "messageAnimation",
+ "messageAudio",
+ // "messageContact",
+ // "messageDice"
+ "messageDocument",
+ "messageGame",
+ // "messageInvoice",
+ "messageLocation",
+ // "messagePassportDataSent",
+ // "messagePaymentSuccessful",
+ "messagePhoto",
+ "messagePoll",
+ // "messageProximityAlertTriggered",
+ "messageSticker",
+ "messageVenue",
+ "messageVideo",
+ "messageVideoNote",
+ "messageVoiceNote"
+ ]
+
readonly property var simpleDelegateMessages: ["messageBasicGroupChatCreate",
"messageChatAddMembers",
"messageChatChangePhoto",
@@ -1098,6 +1112,7 @@ Page {
"messageChatJoinByLink",
"messageChatSetTtl",
"messageChatUpgradeFrom",
+ // "messageContactRegistered","messageExpiredPhoto", "messageExpiredVideo","messageWebsiteConnected"
"messageGameScore",
"messageChatUpgradeTo",
"messageCustomServiceAction",
@@ -1115,7 +1130,7 @@ Page {
myMessage: model.display
messageId: model.message_id
messageIndex: model.index
- extraContentComponentName: chatView.contentComponentNames[model.content_type] || ""
+ hasContentComponent: !!myMessage.content && chatView.delegateMessagesContent.indexOf(model.content_type) > -1
canReplyToMessage: chatPage.canSendMessages
onReplyToMessage: {
newMessageInReplyToRow.inReplyToMessage = myMessage
diff --git a/translations/harbour-fernschreiber-de.ts b/translations/harbour-fernschreiber-de.ts
index dabc925..e3e2b09 100644
--- a/translations/harbour-fernschreiber-de.ts
+++ b/translations/harbour-fernschreiber-de.ts
@@ -490,21 +490,6 @@
Chats
-
- DocumentPreview
-
-
- Dokument herunterladen
-
-
-
- Dokument öffnen
-
-
-
- Dokument zu Downloads kopieren
-
-
EditGroupChatPermissionsColumn
@@ -946,10 +931,18 @@
- LocationPreview
+ MessageDocument
-
- Installieren Sie Pure Maps, um diesen Ort zu erkunden.
+
+ Dokument herunterladen
+
+
+
+ Dokument öffnen
+
+
+
+ Dokument zu Downloads kopieren
@@ -1021,6 +1014,13 @@
+
+ MessageLocation
+
+
+ Installieren Sie Pure Maps, um diesen Ort zu erkunden.
+
+
MessageOverlayFlickable
@@ -1032,6 +1032,41 @@
Diese Nachricht wurde weitergeleitet. Ursprünglicher Autor: %1
+
+ MessagePoll
+
+
+ Umfrage beenden
+
+
+
+ Antwort zurückziehen
+
+
+
+ Endergebnis:
+
+
+
+ Mehrfachauswahl ist erlaubt.
+
+
+
+ % of votes for option
+
+ %Ln%
+ %Ln%
+
+
+
+
+ number of total votes
+
+ %Ln Stimme insgesamt
+ %Ln Stimmen insgesamt
+
+
+
MessageViaLabel
@@ -1272,41 +1307,6 @@
Quizze haben eine korrekte Antwort. Teilnehmer können ihre Antwort nicht zurückziehen.
-
- PollPreview
-
-
- % of votes for option
-
- %Ln%
- %Ln%
-
-
-
-
- Endergebnis:
-
-
-
- Mehrfachauswahl ist erlaubt.
-
-
-
- number of total votes
-
- %Ln Stimme insgesamt
- %Ln Stimmen insgesamt
-
-
-
-
- Umfrage beenden
-
-
-
- Antwort zurückziehen
-
-
PollResultsPage
@@ -1986,7 +1986,7 @@
myself
-
+
haben %Ln Punkt erziehlt
haben %Ln Punkte erziehlt
diff --git a/translations/harbour-fernschreiber-en.ts b/translations/harbour-fernschreiber-en.ts
index 51c44ce..5d697bd 100644
--- a/translations/harbour-fernschreiber-en.ts
+++ b/translations/harbour-fernschreiber-en.ts
@@ -490,21 +490,6 @@
chats
-
- DocumentPreview
-
-
- Download Document
-
-
-
- Open Document
-
-
-
- Copy Document to Downloads
-
-
EditGroupChatPermissionsColumn
@@ -946,10 +931,18 @@
- LocationPreview
+ MessageDocument
-
- Install Pure Maps to inspect this location.
+
+ Download Document
+
+
+
+ Open Document
+
+
+
+ Copy Document to Downloads
@@ -1021,6 +1014,13 @@
+
+ MessageLocation
+
+
+ Install Pure Maps to inspect this location.
+
+
MessageOverlayFlickable
@@ -1032,6 +1032,41 @@
This message was forwarded. Original author: %1
+
+ MessagePoll
+
+
+ Close Poll
+
+
+
+ Reset Answer
+
+
+
+ Final Result:
+
+
+
+ Multiple Answers are allowed.
+
+
+
+ % of votes for option
+
+ %Ln%
+ %Ln%
+
+
+
+
+ number of total votes
+
+ %Ln vote total
+ %Ln votes total
+
+
+
MessageViaLabel
@@ -1272,41 +1307,6 @@
Quizzes have one correct answer. Participants can't revoke their responses.
-
- PollPreview
-
-
- % of votes for option
-
- %Ln%
- %Ln%
-
-
-
-
- Final Result:
-
-
-
- Multiple Answers are allowed.
-
-
-
- number of total votes
-
- %Ln vote total
- %Ln votes total
-
-
-
-
- Close Poll
-
-
-
- Reset Answer
-
-
PollResultsPage
diff --git a/translations/harbour-fernschreiber-es.ts b/translations/harbour-fernschreiber-es.ts
index 7dee1a2..7cb5598 100644
--- a/translations/harbour-fernschreiber-es.ts
+++ b/translations/harbour-fernschreiber-es.ts
@@ -1,6 +1,6 @@
-
+
AboutPage
@@ -107,14 +107,16 @@
ChatInformationPageContent
-
+
%1 suscriptores
+
-
+
%1 miembros
+
@@ -172,8 +174,9 @@
-
+
%1 en línea
+
@@ -302,14 +305,16 @@
-
+
%1 miembros
+
-
+
%1 suscriptores
+
@@ -362,28 +367,32 @@
-
+
%Ln Mensajes borrados
+
-
+
%Ln se han copiado los mensajes
+
dialog header
-
+
Reenviar %Ln mensajes
+
number of messages selected
-
+
%Ln mensajes seleccionados
+
@@ -393,8 +402,9 @@
-
+
%1 en línea
+
@@ -480,21 +490,6 @@
charlas
-
- DocumentPreview
-
-
- Bajar Documento
-
-
-
- Abrir Documento
-
-
-
- Copiar documento a Downloads
-
-
EditGroupChatPermissionsColumn
@@ -826,12 +821,14 @@
myself
+
+
@@ -934,10 +931,18 @@
- LocationPreview
+ MessageDocument
-
- Instalar Pure Maps para inspeccionar esta ubicación.
+
+ Bajar Documento
+
+
+
+ Abrir Documento
+
+
+
+ Copiar documento a Downloads
@@ -998,15 +1003,24 @@
myself
+
+
+
+ MessageLocation
+
+
+ Instalar Pure Maps para inspeccionar esta ubicación.
+
+
MessageOverlayFlickable
@@ -1018,6 +1032,41 @@
Este mensaje fue reenviado. Autor original: %1
+
+ MessagePoll
+
+
+ Cerrar encuesta
+
+
+
+ Restablecer respuesta
+
+
+
+ Resultado final:
+
+
+
+ Se permiten múltiples respuestas.
+
+
+
+ % of votes for option
+
+ %Ln%
+
+
+
+
+
+ number of total votes
+
+
+
+
+
+
MessageViaLabel
@@ -1077,8 +1126,9 @@
NotificationManager
-
+
%Ln mensajes no leídos
+
@@ -1210,8 +1260,9 @@
-
+
Pregunta (quedan %Ln caracteres)
+
@@ -1225,8 +1276,9 @@
-
+
Respuesta (quedan %Ln caracteres)
+
@@ -1255,39 +1307,6 @@
Los interrogatorios tienen una respuesta correcta. Los participantes no pueden revocar sus respuestas.
-
- PollPreview
-
-
- % of votes for option
-
- %Ln%
-
-
-
-
- Resultado final:
-
-
-
- Se permiten múltiples respuestas.
-
-
-
- number of total votes
-
- %Ln votos totales
-
-
-
-
- Cerrar encuesta
-
-
-
- Restablecer respuesta
-
-
PollResultsPage
@@ -1301,8 +1320,9 @@
number of total votes
-
+
%Ln total de votos
+
@@ -1318,15 +1338,17 @@
number of votes for option
-
+
%Ln votos
+
% of votes for option
-
+
%Ln%
+
@@ -1337,8 +1359,9 @@
number of votes for option
-
+
%Ln votos incluyendo el suyo
+
@@ -1366,14 +1389,16 @@
-
+
%1 miembros
+
-
+
%1 suscriptores
+
@@ -1963,6 +1988,7 @@
myself
+
diff --git a/translations/harbour-fernschreiber-fi.ts b/translations/harbour-fernschreiber-fi.ts
index 99e7130..89dd26a 100644
--- a/translations/harbour-fernschreiber-fi.ts
+++ b/translations/harbour-fernschreiber-fi.ts
@@ -491,21 +491,6 @@
keskustelussa
-
- DocumentPreview
-
-
- Lataa dokumentti
-
-
-
- Avaa dokumentti
-
-
-
-
-
-
EditGroupChatPermissionsColumn
@@ -947,10 +932,18 @@
- LocationPreview
+ MessageDocument
-
- Asenna Pure Maps tarkastellaksesi sijaintia.
+
+ Lataa dokumentti
+
+
+
+ Avaa dokumentti
+
+
+
+
@@ -1022,6 +1015,13 @@
+
+ MessageLocation
+
+
+ Asenna Pure Maps tarkastellaksesi sijaintia.
+
+
MessageOverlayFlickable
@@ -1033,6 +1033,41 @@
Välitetty viesti. Alkuperäinen lähettäjä: %1
+
+ MessagePoll
+
+
+ Sulje kysely
+
+
+
+ Tyhjennä vastaus
+
+
+
+ Lopullinen tulos:
+
+
+
+ Useampi vastaus sallittu.
+
+
+
+ % of votes for option
+
+ %Ln%
+ %Ln%
+
+
+
+
+ number of total votes
+
+
+
+
+
+
MessageViaLabel
@@ -1273,41 +1308,6 @@
Visoilla on yksi oikea vastaus. Osallistujat eivät voi kumota vastaustaan.
-
- PollPreview
-
-
- % of votes for option
-
- %Ln%
- %Ln%
-
-
-
-
- Lopullinen tulos:
-
-
-
- Useampi vastaus sallittu.
-
-
-
- number of total votes
-
- yhteensä %Ln ääni
- yhteensä %Ln ääntä
-
-
-
-
- Sulje kysely
-
-
-
- Tyhjennä vastaus
-
-
PollResultsPage
diff --git a/translations/harbour-fernschreiber-hu.ts b/translations/harbour-fernschreiber-hu.ts
index b03007c..9e765a5 100644
--- a/translations/harbour-fernschreiber-hu.ts
+++ b/translations/harbour-fernschreiber-hu.ts
@@ -480,21 +480,6 @@
csevegések
-
- DocumentPreview
-
-
- Dokumentum letöltése
-
-
-
- Dokumentum megyitása
-
-
-
-
-
-
EditGroupChatPermissionsColumn
@@ -934,9 +919,17 @@
- LocationPreview
+ MessageDocument
-
+
+ Dokumentum letöltése
+
+
+
+ Dokumentum megyitása
+
+
+
@@ -1007,6 +1000,13 @@
+
+ MessageLocation
+
+
+
+
+
MessageOverlayFlickable
@@ -1018,6 +1018,39 @@
+
+ MessagePoll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ % of votes for option
+
+
+
+
+
+
+ number of total votes
+
+
+
+
+
MessageViaLabel
@@ -1255,39 +1288,6 @@
-
- PollPreview
-
-
- % of votes for option
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- number of total votes
-
-
-
-
-
-
-
-
-
-
-
-
-
PollResultsPage
diff --git a/translations/harbour-fernschreiber-it.ts b/translations/harbour-fernschreiber-it.ts
index 1a7c553..7fbe72d 100644
--- a/translations/harbour-fernschreiber-it.ts
+++ b/translations/harbour-fernschreiber-it.ts
@@ -490,21 +490,6 @@
Aggiorna contenuti...
-
- DocumentPreview
-
-
- Scarica documento
-
-
-
- Apri documento
-
-
-
-
-
-
EditGroupChatPermissionsColumn
@@ -946,10 +931,18 @@
- LocationPreview
+ MessageDocument
-
- Installa Pure Maps per conoscere questo luogo.
+
+ Scarica documento
+
+
+
+ Apri documento
+
+
+
+
@@ -1021,6 +1014,13 @@
+
+ MessageLocation
+
+
+ Installa Pure Maps per conoscere questo luogo.
+
+
MessageOverlayFlickable
@@ -1032,6 +1032,41 @@
Questo è un messaggio inoltrato. Autore originale: %1
+
+ MessagePoll
+
+
+ Termina sondaggio
+
+
+
+ Annulla risposta
+
+
+
+ Risultato:
+
+
+
+ Risposte multiple consentite.
+
+
+
+ % of votes for option
+
+ %Ln%
+ %Ln%
+
+
+
+
+ number of total votes
+
+ %Ln voto in totale
+ %Ln voti in totale
+
+
+
MessageViaLabel
@@ -1272,41 +1307,6 @@
I quiz hanno una sola risposta corretta. I partecipanti non possono revocare le risposte.
-
- PollPreview
-
-
- % of votes for option
-
- %Ln%
- %Ln%
-
-
-
-
- Risultato:
-
-
-
- Risposte multiple consentite.
-
-
-
- number of total votes
-
- %Ln voto in totale
- %Ln voti in totale
-
-
-
-
- Termina sondaggio
-
-
-
- Annulla risposta
-
-
PollResultsPage
diff --git a/translations/harbour-fernschreiber-pl.ts b/translations/harbour-fernschreiber-pl.ts
index 51d5db4..2164cd2 100644
--- a/translations/harbour-fernschreiber-pl.ts
+++ b/translations/harbour-fernschreiber-pl.ts
@@ -500,21 +500,6 @@
czaty
-
- DocumentPreview
-
-
- Pobierz dokument
-
-
-
- Otwórz dokument
-
-
-
-
-
-
EditGroupChatPermissionsColumn
@@ -958,10 +943,18 @@
- LocationPreview
+ MessageDocument
-
- Zainstaluj Pure Maps, aby sprawdzić tę lokalizację.
+
+ Pobierz dokument
+
+
+
+ Otwórz dokument
+
+
+
+
@@ -1035,6 +1028,13 @@
+
+ MessageLocation
+
+
+ Zainstaluj Pure Maps, aby sprawdzić tę lokalizację.
+
+
MessageOverlayFlickable
@@ -1046,6 +1046,43 @@
Ta wiadomość została przekazana. Oryginalny autor: %1
+
+ MessagePoll
+
+
+ Zamknij ankietę
+
+
+
+ Resetuj odpowiedź
+
+
+
+ Ostateczny wynik:
+
+
+
+ Dozwolonych jest wiele odpowiedzi.
+
+
+
+ % of votes for option
+
+ %Ln%
+ %Ln%
+ %Ln%
+
+
+
+
+ number of total votes
+
+ %Ln odpowiedź
+ %Ln odpowiedzi
+ %Ln odpowiedzi
+
+
+
MessageViaLabel
@@ -1289,43 +1326,6 @@
Quizy mają jedną poprawną odpowiedź. Uczestnicy nie mogą odwołać swoich odpowiedzi.
-
- PollPreview
-
-
- % of votes for option
-
- %Ln%
- %Ln%
- %Ln%
-
-
-
-
- Ostateczny wynik:
-
-
-
- Dozwolonych jest wiele odpowiedzi.
-
-
-
- number of total votes
-
- %Ln odpowiedź
- %Ln odpowiedzi
- %Ln odpowiedzi
-
-
-
-
- Zamknij ankietę
-
-
-
- Resetuj odpowiedź
-
-
PollResultsPage
diff --git a/translations/harbour-fernschreiber-ru.ts b/translations/harbour-fernschreiber-ru.ts
index ef0e07a..2ec6396 100644
--- a/translations/harbour-fernschreiber-ru.ts
+++ b/translations/harbour-fernschreiber-ru.ts
@@ -500,21 +500,6 @@
чатах
-
- DocumentPreview
-
-
- Скачать документ
-
-
-
- Открыть документ
-
-
-
- Сохранить в Загрузках
-
-
EditGroupChatPermissionsColumn
@@ -958,10 +943,18 @@
- LocationPreview
+ MessageDocument
-
- Для просмотра карты, установите Pure Maps.
+
+ Скачать документ
+
+
+
+ Открыть документ
+
+
+
+ Сохранить в Загрузках
@@ -1035,6 +1028,13 @@
+
+ MessageLocation
+
+
+ Для просмотра карты, установите Pure Maps.
+
+
MessageOverlayFlickable
@@ -1046,6 +1046,43 @@
Это сообщение было переадресовано. Первоначальный автор: %1
+
+ MessagePoll
+
+
+ Прекратить Опрос
+
+
+
+ Обнулить Ответ
+
+
+
+ Окончательный Результат
+
+
+
+ Разрешено несколько вариантов ответов.
+
+
+
+ % of votes for option
+
+
+
+
+
+
+
+
+ number of total votes
+
+
+
+
+
+
+
MessageViaLabel
@@ -1289,43 +1326,6 @@
Тесты имеют один правильный ответ. Участники не могут отозвать свои ответы.
-
- PollPreview
-
-
- % of votes for option
-
-
-
-
-
-
-
-
- Окончательный Результат
-
-
-
- Разрешено несколько вариантов ответов.
-
-
-
- number of total votes
-
-
-
-
-
-
-
-
- Прекратить Опрос
-
-
-
- Обнулить Ответ
-
-
PollResultsPage
diff --git a/translations/harbour-fernschreiber-sv.ts b/translations/harbour-fernschreiber-sv.ts
index 6bd2e8e..3947051 100644
--- a/translations/harbour-fernschreiber-sv.ts
+++ b/translations/harbour-fernschreiber-sv.ts
@@ -490,21 +490,6 @@
chattar
-
- DocumentPreview
-
-
- Ladda ner dokument
-
-
-
- Öppna dokument
-
-
-
-
-
-
EditGroupChatPermissionsColumn
@@ -946,10 +931,18 @@
- LocationPreview
+ MessageDocument
-
- Installera Pure Maps för att inspektera den här platsen.
+
+ Ladda ner dokument
+
+
+
+ Öppna dokument
+
+
+
+
@@ -1021,6 +1014,13 @@
+
+ MessageLocation
+
+
+ Installera Pure Maps för att inspektera den här platsen.
+
+
MessageOverlayFlickable
@@ -1032,6 +1032,41 @@
Detta meddelande är vidarebefordrat. Ursprunglig avsändare: %1
+
+ MessagePoll
+
+
+ Stäng omröstningen
+
+
+
+ Återställ svar
+
+
+
+ Slutresultat:
+
+
+
+ Flera svarsalternativ tillåtna.
+
+
+
+ % of votes for option
+
+ %Ln%
+ %Ln%
+
+
+
+
+ number of total votes
+
+ %Ln röst sammanlagt
+ %Ln röster sammanlagt
+
+
+
MessageViaLabel
@@ -1272,41 +1307,6 @@
Frågor har ett (1) korrekt svar. Deltagarna kan inte återkalla sina svar.
-
- PollPreview
-
-
- Slutresultat:
-
-
-
- Flera svarsalternativ tillåtna.
-
-
-
- % of votes for option
-
- %Ln%
- %Ln%
-
-
-
-
- number of total votes
-
- %Ln röst sammanlagt
- %Ln röster sammanlagt
-
-
-
-
- Stäng omröstningen
-
-
-
- Återställ svar
-
-
PollResultsPage
diff --git a/translations/harbour-fernschreiber-zh_CN.ts b/translations/harbour-fernschreiber-zh_CN.ts
index 956819b..d76d0f8 100644
--- a/translations/harbour-fernschreiber-zh_CN.ts
+++ b/translations/harbour-fernschreiber-zh_CN.ts
@@ -480,21 +480,6 @@
对话
-
- DocumentPreview
-
-
- 下载文档
-
-
-
- 打开文档
-
-
-
- 复制文档到下载
-
-
EditGroupChatPermissionsColumn
@@ -934,10 +919,18 @@
- LocationPreview
+ MessageDocument
-
- 请安装 Pure Maps 以插入位置
+
+ 下载文档
+
+
+
+ 打开文档
+
+
+
+ 复制文档到下载
@@ -1007,6 +1000,13 @@
+
+ MessageLocation
+
+
+ 请安装 Pure Maps 以插入位置
+
+
MessageOverlayFlickable
@@ -1018,6 +1018,39 @@
此消息为转发消息,原作者: %1
+
+ MessagePoll
+
+
+ 关闭投票
+
+
+
+ 重设回答
+
+
+
+ 最终结果:
+
+
+
+ 允许多个回答。
+
+
+
+ % of votes for option
+
+ %Ln%
+
+
+
+
+ number of total votes
+
+
+
+
+
MessageViaLabel
@@ -1255,39 +1288,6 @@
Quiz 拥有一个正确选项,参与者无法撤销回答。
-
- PollPreview
-
-
- % of votes for option
-
- %Ln%
-
-
-
-
- 最终结果:
-
-
-
- 允许多个回答。
-
-
-
- number of total votes
-
- 总计 %Ln 次回答
-
-
-
-
- 关闭投票
-
-
-
- 重设回答
-
-
PollResultsPage
diff --git a/translations/harbour-fernschreiber.ts b/translations/harbour-fernschreiber.ts
index 9dd1765..2d67e32 100644
--- a/translations/harbour-fernschreiber.ts
+++ b/translations/harbour-fernschreiber.ts
@@ -490,21 +490,6 @@
chats
-
- DocumentPreview
-
-
- Download Document
-
-
-
- Open Document
-
-
-
-
-
-
EditGroupChatPermissionsColumn
@@ -946,10 +931,18 @@
- LocationPreview
+ MessageDocument
-
- Install Pure Maps to inspect this location.
+
+ Download Document
+
+
+
+ Open Document
+
+
+
+
@@ -1021,6 +1014,13 @@
+
+ MessageLocation
+
+
+ Install Pure Maps to inspect this location.
+
+
MessageOverlayFlickable
@@ -1032,6 +1032,41 @@
+
+ MessagePoll
+
+
+ Close Poll
+
+
+
+ Reset Answer
+
+
+
+ Final Result:
+
+
+
+ Multiple Answers are allowed.
+
+
+
+ % of votes for option
+
+ %Ln%
+ %Ln%
+
+
+
+
+ number of total votes
+
+ %Ln vote total
+ %Ln votes total
+
+
+
MessageViaLabel
@@ -1272,41 +1307,6 @@
Quizzes have one correct answer. Participants can't revoke their responses.
-
- PollPreview
-
-
- % of votes for option
-
- %Ln%
- %Ln%
-
-
-
-
- Final Result:
-
-
-
- Multiple Answers are allowed.
-
-
-
- number of total votes
-
- %Ln vote total
- %Ln votes total
-
-
-
-
- Close Poll
-
-
-
- Reset Answer
-
-
PollResultsPage