Show in-reply-to message if it was deleted, fixes #374
This commit is contained in:
parent
0a4fd6be93
commit
fc2c53f840
14 changed files with 107 additions and 1 deletions
|
@ -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 = "<i>" + qsTr("This message was deleted") + "</i>";
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: inReplyToMessageRectangle
|
||||
height: inReplyToMessageColumn.height
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -869,6 +869,14 @@
|
|||
<source>You</source>
|
||||
<translation>Sie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown</source>
|
||||
<translation>Unbekannt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This message was deleted</source>
|
||||
<translation>Diese Nachricht wurde gelöscht</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>InitializationPage</name>
|
||||
|
|
|
@ -871,6 +871,14 @@ messages</numerusform>
|
|||
<source>You</source>
|
||||
<translation>You</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown</source>
|
||||
<translation>Unknown</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This message was deleted</source>
|
||||
<translation>This message was deleted</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>InitializationPage</name>
|
||||
|
|
|
@ -869,6 +869,14 @@
|
|||
<source>You</source>
|
||||
<translation>Usted</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished">Desconocido</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This message was deleted</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>InitializationPage</name>
|
||||
|
|
|
@ -870,6 +870,14 @@
|
|||
<source>You</source>
|
||||
<translation>Sinä</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished">Tuntematon</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This message was deleted</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>InitializationPage</name>
|
||||
|
|
|
@ -855,6 +855,14 @@
|
|||
<source>You</source>
|
||||
<translation>Te</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished">Ismeretlen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This message was deleted</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>InitializationPage</name>
|
||||
|
|
|
@ -869,6 +869,14 @@
|
|||
<source>You</source>
|
||||
<translation>Tu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished">Sconosciuto</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This message was deleted</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>InitializationPage</name>
|
||||
|
|
|
@ -883,6 +883,14 @@
|
|||
<source>You</source>
|
||||
<translation>Ty</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished">Nieznany</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This message was deleted</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>InitializationPage</name>
|
||||
|
|
|
@ -886,6 +886,14 @@
|
|||
<source>You</source>
|
||||
<translation>Вы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This message was deleted</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>InitializationPage</name>
|
||||
|
|
|
@ -883,6 +883,14 @@
|
|||
<source>You</source>
|
||||
<translation>Ja</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished">Neznámy</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This message was deleted</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>InitializationPage</name>
|
||||
|
|
|
@ -869,6 +869,14 @@
|
|||
<source>You</source>
|
||||
<translation>Du</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished">Okänd</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This message was deleted</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>InitializationPage</name>
|
||||
|
|
|
@ -856,6 +856,14 @@
|
|||
<source>You</source>
|
||||
<translation>你</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished">未知</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This message was deleted</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>InitializationPage</name>
|
||||
|
|
|
@ -869,6 +869,14 @@
|
|||
<source>You</source>
|
||||
<translation>You</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished">Unknown</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This message was deleted</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>InitializationPage</name>
|
||||
|
|
Loading…
Reference in a new issue