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 - - Download Document - Dokument herunterladen - - - Open Document - Dokument öffnen - - - Copy Document to Downloads - Dokument zu Downloads kopieren - - EditGroupChatPermissionsColumn @@ -946,10 +931,18 @@ - LocationPreview + MessageDocument - Install Pure Maps to inspect this location. - Installieren Sie Pure Maps, um diesen Ort zu erkunden. + Download Document + Dokument herunterladen + + + Open Document + Dokument öffnen + + + Copy Document to Downloads + Dokument zu Downloads kopieren @@ -1021,6 +1014,13 @@ + + MessageLocation + + Install Pure Maps to inspect this location. + Installieren Sie Pure Maps, um diesen Ort zu erkunden. + + MessageOverlayFlickable @@ -1032,6 +1032,41 @@ Diese Nachricht wurde weitergeleitet. Ursprünglicher Autor: %1 + + MessagePoll + + Close Poll + Umfrage beenden + + + Reset Answer + Antwort zurückziehen + + + Final Result: + Endergebnis: + + + Multiple Answers are allowed. + Mehrfachauswahl ist erlaubt. + + + %Ln% + % of votes for option + + %Ln% + %Ln% + + + + %Ln vote(s) total + 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 - - %Ln% - % of votes for option - - %Ln% - %Ln% - - - - Final Result: - Endergebnis: - - - Multiple Answers are allowed. - Mehrfachauswahl ist erlaubt. - - - %Ln vote(s) total - number of total votes - - %Ln Stimme insgesamt - %Ln Stimmen insgesamt - - - - Close Poll - Umfrage beenden - - - Reset Answer - Antwort zurückziehen - - PollResultsPage @@ -1986,7 +1986,7 @@ scored %Ln points 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 - Download Document - - - Open Document - Open Document - - - Copy Document to Downloads - Copy Document to Downloads - - EditGroupChatPermissionsColumn @@ -946,10 +931,18 @@ - LocationPreview + MessageDocument - Install Pure Maps to inspect this location. - Install Pure Maps to inspect this location. + Download Document + Download Document + + + Open Document + Open Document + + + Copy Document to Downloads + Copy Document to Downloads @@ -1021,6 +1014,13 @@ + + MessageLocation + + Install Pure Maps to inspect this location. + Install Pure Maps to inspect this location. + + MessageOverlayFlickable @@ -1032,6 +1032,41 @@ This message was forwarded. Original author: %1 + + MessagePoll + + Close Poll + Close Poll + + + Reset Answer + Reset Answer + + + Final Result: + Final Result: + + + Multiple Answers are allowed. + Multiple Answers are allowed. + + + %Ln% + % of votes for option + + %Ln% + %Ln% + + + + %Ln vote(s) total + 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 - - %Ln% - % of votes for option - - %Ln% - %Ln% - - - - Final Result: - Final Result: - - - Multiple Answers are allowed. - Multiple Answers are allowed. - - - %Ln vote(s) total - number of total votes - - %Ln vote total - %Ln votes total - - - - Close Poll - Close Poll - - - Reset Answer - 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 subscribers - + %1 suscriptores + %1 members - + %1 miembros + @@ -172,8 +174,9 @@ %1 online - + %1 en línea + @@ -302,14 +305,16 @@ %1 members - + %1 miembros + %1 subscribers - + %1 suscriptores + @@ -362,28 +367,32 @@ %Ln Messages deleted - + %Ln Mensajes borrados + %Ln messages have been copied - + %Ln se han copiado los mensajes + Forward %Ln messages dialog header - + Reenviar %Ln mensajes + %Ln messages selected number of messages selected - + %Ln mensajes seleccionados + @@ -393,8 +402,9 @@ %1 online - + %1 en línea + @@ -480,21 +490,6 @@ charlas - - DocumentPreview - - Download Document - Bajar Documento - - - Open Document - Abrir Documento - - - Copy Document to Downloads - Copiar documento a Downloads - - EditGroupChatPermissionsColumn @@ -826,12 +821,14 @@ myself + scored %Ln points + @@ -934,10 +931,18 @@ - LocationPreview + MessageDocument - Install Pure Maps to inspect this location. - Instalar Pure Maps para inspeccionar esta ubicación. + Download Document + Bajar Documento + + + Open Document + Abrir Documento + + + Copy Document to Downloads + Copiar documento a Downloads @@ -998,15 +1003,24 @@ myself + scored %Ln points in %2 + + + MessageLocation + + Install Pure Maps to inspect this location. + Instalar Pure Maps para inspeccionar esta ubicación. + + MessageOverlayFlickable @@ -1018,6 +1032,41 @@ Este mensaje fue reenviado. Autor original: %1 + + MessagePoll + + Close Poll + Cerrar encuesta + + + Reset Answer + Restablecer respuesta + + + Final Result: + Resultado final: + + + Multiple Answers are allowed. + Se permiten múltiples respuestas. + + + %Ln% + % of votes for option + + %Ln% + + + + + %Ln vote(s) total + number of total votes + + + + + + MessageViaLabel @@ -1077,8 +1126,9 @@ NotificationManager %Ln unread messages - + %Ln mensajes no leídos + @@ -1210,8 +1260,9 @@ Question (%Ln characters left) - + Pregunta (quedan %Ln caracteres) + @@ -1225,8 +1276,9 @@ Answer (%Ln characters left) - + Respuesta (quedan %Ln caracteres) + @@ -1255,39 +1307,6 @@ Los interrogatorios tienen una respuesta correcta. Los participantes no pueden revocar sus respuestas. - - PollPreview - - %Ln% - % of votes for option - - %Ln% - - - - Final Result: - Resultado final: - - - Multiple Answers are allowed. - Se permiten múltiples respuestas. - - - %Ln vote(s) total - number of total votes - - %Ln votos totales - - - - Close Poll - Cerrar encuesta - - - Reset Answer - Restablecer respuesta - - PollResultsPage @@ -1301,8 +1320,9 @@ %Ln vote(s) total number of total votes - + %Ln total de votos + @@ -1318,15 +1338,17 @@ %Ln vote(s) number of votes for option - + %Ln votos + %Ln% % of votes for option - + %Ln% + @@ -1337,8 +1359,9 @@ %Ln vote(s) including yours number of votes for option - + %Ln votos incluyendo el suyo + @@ -1366,14 +1389,16 @@ %1 members - + %1 miembros + %1 subscribers - + %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 - - Download Document - Lataa dokumentti - - - Open Document - Avaa dokumentti - - - Copy Document to Downloads - - - EditGroupChatPermissionsColumn @@ -947,10 +932,18 @@ - LocationPreview + MessageDocument - Install Pure Maps to inspect this location. - Asenna Pure Maps tarkastellaksesi sijaintia. + Download Document + Lataa dokumentti + + + Open Document + Avaa dokumentti + + + Copy Document to Downloads + @@ -1022,6 +1015,13 @@ + + MessageLocation + + Install Pure Maps to inspect this location. + Asenna Pure Maps tarkastellaksesi sijaintia. + + MessageOverlayFlickable @@ -1033,6 +1033,41 @@ Välitetty viesti. Alkuperäinen lähettäjä: %1 + + MessagePoll + + Close Poll + Sulje kysely + + + Reset Answer + Tyhjennä vastaus + + + Final Result: + Lopullinen tulos: + + + Multiple Answers are allowed. + Useampi vastaus sallittu. + + + %Ln% + % of votes for option + + %Ln% + %Ln% + + + + %Ln vote(s) total + number of total votes + + + + + + MessageViaLabel @@ -1273,41 +1308,6 @@ Visoilla on yksi oikea vastaus. Osallistujat eivät voi kumota vastaustaan. - - PollPreview - - %Ln% - % of votes for option - - %Ln% - %Ln% - - - - Final Result: - Lopullinen tulos: - - - Multiple Answers are allowed. - Useampi vastaus sallittu. - - - %Ln vote(s) total - number of total votes - - yhteensä %Ln ääni - yhteensä %Ln ääntä - - - - Close Poll - Sulje kysely - - - Reset Answer - 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 - - Download Document - Dokumentum letöltése - - - Open Document - Dokumentum megyitása - - - Copy Document to Downloads - - - EditGroupChatPermissionsColumn @@ -934,9 +919,17 @@ - LocationPreview + MessageDocument - Install Pure Maps to inspect this location. + Download Document + Dokumentum letöltése + + + Open Document + Dokumentum megyitása + + + Copy Document to Downloads @@ -1007,6 +1000,13 @@ + + MessageLocation + + Install Pure Maps to inspect this location. + + + MessageOverlayFlickable @@ -1018,6 +1018,39 @@ + + MessagePoll + + Close Poll + + + + Reset Answer + + + + Final Result: + + + + Multiple Answers are allowed. + + + + %Ln% + % of votes for option + + + + + + %Ln vote(s) total + number of total votes + + + + + MessageViaLabel @@ -1255,39 +1288,6 @@ - - PollPreview - - %Ln% - % of votes for option - - - - - - Final Result: - - - - Multiple Answers are allowed. - - - - %Ln vote(s) total - number of total votes - - - - - - Close Poll - - - - Reset Answer - - - 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 - - Download Document - Scarica documento - - - Open Document - Apri documento - - - Copy Document to Downloads - - - EditGroupChatPermissionsColumn @@ -946,10 +931,18 @@ - LocationPreview + MessageDocument - Install Pure Maps to inspect this location. - Installa Pure Maps per conoscere questo luogo. + Download Document + Scarica documento + + + Open Document + Apri documento + + + Copy Document to Downloads + @@ -1021,6 +1014,13 @@ + + MessageLocation + + Install Pure Maps to inspect this location. + Installa Pure Maps per conoscere questo luogo. + + MessageOverlayFlickable @@ -1032,6 +1032,41 @@ Questo è un messaggio inoltrato. Autore originale: %1 + + MessagePoll + + Close Poll + Termina sondaggio + + + Reset Answer + Annulla risposta + + + Final Result: + Risultato: + + + Multiple Answers are allowed. + Risposte multiple consentite. + + + %Ln% + % of votes for option + + %Ln% + %Ln% + + + + %Ln vote(s) total + 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 - - %Ln% - % of votes for option - - %Ln% - %Ln% - - - - Final Result: - Risultato: - - - Multiple Answers are allowed. - Risposte multiple consentite. - - - %Ln vote(s) total - number of total votes - - %Ln voto in totale - %Ln voti in totale - - - - Close Poll - Termina sondaggio - - - Reset Answer - 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 - - Download Document - Pobierz dokument - - - Open Document - Otwórz dokument - - - Copy Document to Downloads - - - EditGroupChatPermissionsColumn @@ -958,10 +943,18 @@ - LocationPreview + MessageDocument - Install Pure Maps to inspect this location. - Zainstaluj Pure Maps, aby sprawdzić tę lokalizację. + Download Document + Pobierz dokument + + + Open Document + Otwórz dokument + + + Copy Document to Downloads + @@ -1035,6 +1028,13 @@ + + MessageLocation + + Install Pure Maps to inspect this location. + Zainstaluj Pure Maps, aby sprawdzić tę lokalizację. + + MessageOverlayFlickable @@ -1046,6 +1046,43 @@ Ta wiadomość została przekazana. Oryginalny autor: %1 + + MessagePoll + + Close Poll + Zamknij ankietę + + + Reset Answer + Resetuj odpowiedź + + + Final Result: + Ostateczny wynik: + + + Multiple Answers are allowed. + Dozwolonych jest wiele odpowiedzi. + + + %Ln% + % of votes for option + + %Ln% + %Ln% + %Ln% + + + + %Ln vote(s) total + 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 - - %Ln% - % of votes for option - - %Ln% - %Ln% - %Ln% - - - - Final Result: - Ostateczny wynik: - - - Multiple Answers are allowed. - Dozwolonych jest wiele odpowiedzi. - - - %Ln vote(s) total - number of total votes - - %Ln odpowiedź - %Ln odpowiedzi - %Ln odpowiedzi - - - - Close Poll - Zamknij ankietę - - - Reset Answer - 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 - - Download Document - Скачать документ - - - Open Document - Открыть документ - - - Copy Document to Downloads - Сохранить в Загрузках - - EditGroupChatPermissionsColumn @@ -958,10 +943,18 @@ - LocationPreview + MessageDocument - Install Pure Maps to inspect this location. - Для просмотра карты, установите Pure Maps. + Download Document + Скачать документ + + + Open Document + Открыть документ + + + Copy Document to Downloads + Сохранить в Загрузках @@ -1035,6 +1028,13 @@ + + MessageLocation + + Install Pure Maps to inspect this location. + Для просмотра карты, установите Pure Maps. + + MessageOverlayFlickable @@ -1046,6 +1046,43 @@ Это сообщение было переадресовано. Первоначальный автор: %1 + + MessagePoll + + Close Poll + Прекратить Опрос + + + Reset Answer + Обнулить Ответ + + + Final Result: + Окончательный Результат + + + Multiple Answers are allowed. + Разрешено несколько вариантов ответов. + + + %Ln% + % of votes for option + + + + + + + + %Ln vote(s) total + number of total votes + + + + + + + MessageViaLabel @@ -1289,43 +1326,6 @@ Тесты имеют один правильный ответ. Участники не могут отозвать свои ответы. - - PollPreview - - %Ln% - % of votes for option - - - - - - - - Final Result: - Окончательный Результат - - - Multiple Answers are allowed. - Разрешено несколько вариантов ответов. - - - %Ln vote(s) total - number of total votes - - - - - - - - Close Poll - Прекратить Опрос - - - Reset Answer - Обнулить Ответ - - 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 - - Download Document - Ladda ner dokument - - - Open Document - Öppna dokument - - - Copy Document to Downloads - - - EditGroupChatPermissionsColumn @@ -946,10 +931,18 @@ - LocationPreview + MessageDocument - Install Pure Maps to inspect this location. - Installera Pure Maps för att inspektera den här platsen. + Download Document + Ladda ner dokument + + + Open Document + Öppna dokument + + + Copy Document to Downloads + @@ -1021,6 +1014,13 @@ + + MessageLocation + + Install Pure Maps to inspect this location. + 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 + + Close Poll + Stäng omröstningen + + + Reset Answer + Återställ svar + + + Final Result: + Slutresultat: + + + Multiple Answers are allowed. + Flera svarsalternativ tillåtna. + + + %Ln% + % of votes for option + + %Ln% + %Ln% + + + + %Ln vote(s) total + 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 - - Final Result: - Slutresultat: - - - Multiple Answers are allowed. - Flera svarsalternativ tillåtna. - - - %Ln% - % of votes for option - - %Ln% - %Ln% - - - - %Ln vote(s) total - number of total votes - - %Ln röst sammanlagt - %Ln röster sammanlagt - - - - Close Poll - Stäng omröstningen - - - Reset Answer - Å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 - - Download Document - 下载文档 - - - Open Document - 打开文档 - - - Copy Document to Downloads - 复制文档到下载 - - EditGroupChatPermissionsColumn @@ -934,10 +919,18 @@ - LocationPreview + MessageDocument - Install Pure Maps to inspect this location. - 请安装 Pure Maps 以插入位置 + Download Document + 下载文档 + + + Open Document + 打开文档 + + + Copy Document to Downloads + 复制文档到下载 @@ -1007,6 +1000,13 @@ + + MessageLocation + + Install Pure Maps to inspect this location. + 请安装 Pure Maps 以插入位置 + + MessageOverlayFlickable @@ -1018,6 +1018,39 @@ 此消息为转发消息,原作者: %1 + + MessagePoll + + Close Poll + 关闭投票 + + + Reset Answer + 重设回答 + + + Final Result: + 最终结果: + + + Multiple Answers are allowed. + 允许多个回答。 + + + %Ln% + % of votes for option + + %Ln% + + + + %Ln vote(s) total + number of total votes + + + + + MessageViaLabel @@ -1255,39 +1288,6 @@ Quiz 拥有一个正确选项,参与者无法撤销回答。 - - PollPreview - - %Ln% - % of votes for option - - %Ln% - - - - Final Result: - 最终结果: - - - Multiple Answers are allowed. - 允许多个回答。 - - - %Ln vote(s) total - number of total votes - - 总计 %Ln 次回答 - - - - Close Poll - 关闭投票 - - - Reset Answer - 重设回答 - - 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 - Download Document - - - Open Document - Open Document - - - Copy Document to Downloads - - - EditGroupChatPermissionsColumn @@ -946,10 +931,18 @@ - LocationPreview + MessageDocument - Install Pure Maps to inspect this location. - Install Pure Maps to inspect this location. + Download Document + Download Document + + + Open Document + Open Document + + + Copy Document to Downloads + @@ -1021,6 +1014,13 @@ + + MessageLocation + + Install Pure Maps to inspect this location. + Install Pure Maps to inspect this location. + + MessageOverlayFlickable @@ -1032,6 +1032,41 @@ + + MessagePoll + + Close Poll + Close Poll + + + Reset Answer + Reset Answer + + + Final Result: + Final Result: + + + Multiple Answers are allowed. + Multiple Answers are allowed. + + + %Ln% + % of votes for option + + %Ln% + %Ln% + + + + %Ln vote(s) total + 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 - - %Ln% - % of votes for option - - %Ln% - %Ln% - - - - Final Result: - Final Result: - - - Multiple Answers are allowed. - Multiple Answers are allowed. - - - %Ln vote(s) total - number of total votes - - %Ln vote total - %Ln votes total - - - - Close Poll - Close Poll - - - Reset Answer - Reset Answer - - PollResultsPage