From fc2c53f840bcecefa653a4500934f35d9bc20bac Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Tue, 9 Feb 2021 22:35:19 +0100 Subject: [PATCH] Show in-reply-to message if it was deleted, fixes #374 --- qml/components/InReplyToRow.qml | 8 ++++++++ qml/components/MessageListViewItem.qml | 4 +++- translations/harbour-fernschreiber-de.ts | 8 ++++++++ translations/harbour-fernschreiber-en.ts | 8 ++++++++ translations/harbour-fernschreiber-es.ts | 8 ++++++++ translations/harbour-fernschreiber-fi.ts | 8 ++++++++ translations/harbour-fernschreiber-hu.ts | 8 ++++++++ translations/harbour-fernschreiber-it.ts | 8 ++++++++ translations/harbour-fernschreiber-pl.ts | 8 ++++++++ translations/harbour-fernschreiber-ru.ts | 8 ++++++++ translations/harbour-fernschreiber-sk.ts | 8 ++++++++ translations/harbour-fernschreiber-sv.ts | 8 ++++++++ translations/harbour-fernschreiber-zh_CN.ts | 8 ++++++++ translations/harbour-fernschreiber.ts | 8 ++++++++ 14 files changed, 107 insertions(+), 1 deletion(-) diff --git a/qml/components/InReplyToRow.qml b/qml/components/InReplyToRow.qml index ed9448b..6961071 100644 --- a/qml/components/InReplyToRow.qml +++ b/qml/components/InReplyToRow.qml @@ -31,6 +31,7 @@ Row { property string myUserId; property var inReplyToMessage; property bool editable: false; + property bool inReplyToMessageDeleted: false; signal clearRequested() @@ -41,6 +42,13 @@ Row { } } + onInReplyToMessageDeletedChanged: { + if (inReplyToMessageDeleted) { + inReplyToUserText.text = qsTr("Unknown") + inReplyToMessageText.text = "" + qsTr("This message was deleted") + ""; + } + } + Rectangle { id: inReplyToMessageRectangle height: inReplyToMessageColumn.height diff --git a/qml/components/MessageListViewItem.qml b/qml/components/MessageListViewItem.qml index 74c0f00..80ea571 100644 --- a/qml/components/MessageListViewItem.qml +++ b/qml/components/MessageListViewItem.qml @@ -170,7 +170,7 @@ ListItem { } onMessageNotFound: { if (messageId === myMessage.reply_to_message_id) { - messageInReplyToLoader.active = false; + messageInReplyToLoader.inReplyToMessageDeleted = true; } } } @@ -313,6 +313,7 @@ ListItem { // text height ~= 1,28*font.pixelSize height: active ? precalculatedValues.messageInReplyToHeight : 0 property var inReplyToMessage; + property bool inReplyToMessageDeleted: false; sourceComponent: Component { Item { width: messageInReplyToRow.width @@ -322,6 +323,7 @@ ListItem { myUserId: page.myUserId visible: true inReplyToMessage: messageInReplyToLoader.inReplyToMessage + inReplyToMessageDeleted: messageInReplyToLoader.inReplyToMessageDeleted } MouseArea { anchors.fill: parent diff --git a/translations/harbour-fernschreiber-de.ts b/translations/harbour-fernschreiber-de.ts index e48ffc1..7e7d115 100644 --- a/translations/harbour-fernschreiber-de.ts +++ b/translations/harbour-fernschreiber-de.ts @@ -869,6 +869,14 @@ You Sie + + Unknown + Unbekannt + + + This message was deleted + Diese Nachricht wurde gelöscht + InitializationPage diff --git a/translations/harbour-fernschreiber-en.ts b/translations/harbour-fernschreiber-en.ts index 8bc850b..bf311f4 100644 --- a/translations/harbour-fernschreiber-en.ts +++ b/translations/harbour-fernschreiber-en.ts @@ -871,6 +871,14 @@ messages You You + + Unknown + Unknown + + + This message was deleted + This message was deleted + InitializationPage diff --git a/translations/harbour-fernschreiber-es.ts b/translations/harbour-fernschreiber-es.ts index db93556..9272be0 100644 --- a/translations/harbour-fernschreiber-es.ts +++ b/translations/harbour-fernschreiber-es.ts @@ -869,6 +869,14 @@ You Usted + + Unknown + Desconocido + + + This message was deleted + + InitializationPage diff --git a/translations/harbour-fernschreiber-fi.ts b/translations/harbour-fernschreiber-fi.ts index 3a31640..ebaf0ba 100644 --- a/translations/harbour-fernschreiber-fi.ts +++ b/translations/harbour-fernschreiber-fi.ts @@ -870,6 +870,14 @@ You Sinä + + Unknown + Tuntematon + + + This message was deleted + + InitializationPage diff --git a/translations/harbour-fernschreiber-hu.ts b/translations/harbour-fernschreiber-hu.ts index 4fb69dd..80bf027 100644 --- a/translations/harbour-fernschreiber-hu.ts +++ b/translations/harbour-fernschreiber-hu.ts @@ -855,6 +855,14 @@ You Te + + Unknown + Ismeretlen + + + This message was deleted + + InitializationPage diff --git a/translations/harbour-fernschreiber-it.ts b/translations/harbour-fernschreiber-it.ts index ba88914..bacdb6a 100644 --- a/translations/harbour-fernschreiber-it.ts +++ b/translations/harbour-fernschreiber-it.ts @@ -869,6 +869,14 @@ You Tu + + Unknown + Sconosciuto + + + This message was deleted + + InitializationPage diff --git a/translations/harbour-fernschreiber-pl.ts b/translations/harbour-fernschreiber-pl.ts index 2fc370f..6386ff1 100644 --- a/translations/harbour-fernschreiber-pl.ts +++ b/translations/harbour-fernschreiber-pl.ts @@ -883,6 +883,14 @@ You Ty + + Unknown + Nieznany + + + This message was deleted + + InitializationPage diff --git a/translations/harbour-fernschreiber-ru.ts b/translations/harbour-fernschreiber-ru.ts index 6fcfbc0..8785d7c 100644 --- a/translations/harbour-fernschreiber-ru.ts +++ b/translations/harbour-fernschreiber-ru.ts @@ -886,6 +886,14 @@ You Вы + + Unknown + + + + This message was deleted + + InitializationPage diff --git a/translations/harbour-fernschreiber-sk.ts b/translations/harbour-fernschreiber-sk.ts index 438c20e..848a31a 100644 --- a/translations/harbour-fernschreiber-sk.ts +++ b/translations/harbour-fernschreiber-sk.ts @@ -883,6 +883,14 @@ You Ja + + Unknown + Neznámy + + + This message was deleted + + InitializationPage diff --git a/translations/harbour-fernschreiber-sv.ts b/translations/harbour-fernschreiber-sv.ts index 69c4a7a..8dce6d5 100644 --- a/translations/harbour-fernschreiber-sv.ts +++ b/translations/harbour-fernschreiber-sv.ts @@ -869,6 +869,14 @@ You Du + + Unknown + Okänd + + + This message was deleted + + InitializationPage diff --git a/translations/harbour-fernschreiber-zh_CN.ts b/translations/harbour-fernschreiber-zh_CN.ts index 1a26467..507f5e0 100644 --- a/translations/harbour-fernschreiber-zh_CN.ts +++ b/translations/harbour-fernschreiber-zh_CN.ts @@ -856,6 +856,14 @@ You + + Unknown + 未知 + + + This message was deleted + + InitializationPage diff --git a/translations/harbour-fernschreiber.ts b/translations/harbour-fernschreiber.ts index a87b35c..f640f58 100644 --- a/translations/harbour-fernschreiber.ts +++ b/translations/harbour-fernschreiber.ts @@ -869,6 +869,14 @@ You You + + Unknown + Unknown + + + This message was deleted + + InitializationPage