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 string myUserId;
|
||||||
property var inReplyToMessage;
|
property var inReplyToMessage;
|
||||||
property bool editable: false;
|
property bool editable: false;
|
||||||
|
property bool inReplyToMessageDeleted: false;
|
||||||
|
|
||||||
signal clearRequested()
|
signal clearRequested()
|
||||||
|
|
||||||
|
@ -41,6 +42,13 @@ Row {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onInReplyToMessageDeletedChanged: {
|
||||||
|
if (inReplyToMessageDeleted) {
|
||||||
|
inReplyToUserText.text = qsTr("Unknown")
|
||||||
|
inReplyToMessageText.text = "<i>" + qsTr("This message was deleted") + "</i>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: inReplyToMessageRectangle
|
id: inReplyToMessageRectangle
|
||||||
height: inReplyToMessageColumn.height
|
height: inReplyToMessageColumn.height
|
||||||
|
|
|
@ -170,7 +170,7 @@ ListItem {
|
||||||
}
|
}
|
||||||
onMessageNotFound: {
|
onMessageNotFound: {
|
||||||
if (messageId === myMessage.reply_to_message_id) {
|
if (messageId === myMessage.reply_to_message_id) {
|
||||||
messageInReplyToLoader.active = false;
|
messageInReplyToLoader.inReplyToMessageDeleted = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -313,6 +313,7 @@ ListItem {
|
||||||
// text height ~= 1,28*font.pixelSize
|
// text height ~= 1,28*font.pixelSize
|
||||||
height: active ? precalculatedValues.messageInReplyToHeight : 0
|
height: active ? precalculatedValues.messageInReplyToHeight : 0
|
||||||
property var inReplyToMessage;
|
property var inReplyToMessage;
|
||||||
|
property bool inReplyToMessageDeleted: false;
|
||||||
sourceComponent: Component {
|
sourceComponent: Component {
|
||||||
Item {
|
Item {
|
||||||
width: messageInReplyToRow.width
|
width: messageInReplyToRow.width
|
||||||
|
@ -322,6 +323,7 @@ ListItem {
|
||||||
myUserId: page.myUserId
|
myUserId: page.myUserId
|
||||||
visible: true
|
visible: true
|
||||||
inReplyToMessage: messageInReplyToLoader.inReplyToMessage
|
inReplyToMessage: messageInReplyToLoader.inReplyToMessage
|
||||||
|
inReplyToMessageDeleted: messageInReplyToLoader.inReplyToMessageDeleted
|
||||||
}
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
|
@ -869,6 +869,14 @@
|
||||||
<source>You</source>
|
<source>You</source>
|
||||||
<translation>Sie</translation>
|
<translation>Sie</translation>
|
||||||
</message>
|
</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>
|
||||||
<context>
|
<context>
|
||||||
<name>InitializationPage</name>
|
<name>InitializationPage</name>
|
||||||
|
|
|
@ -871,6 +871,14 @@ messages</numerusform>
|
||||||
<source>You</source>
|
<source>You</source>
|
||||||
<translation>You</translation>
|
<translation>You</translation>
|
||||||
</message>
|
</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>
|
||||||
<context>
|
<context>
|
||||||
<name>InitializationPage</name>
|
<name>InitializationPage</name>
|
||||||
|
|
|
@ -869,6 +869,14 @@
|
||||||
<source>You</source>
|
<source>You</source>
|
||||||
<translation>Usted</translation>
|
<translation>Usted</translation>
|
||||||
</message>
|
</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>
|
||||||
<context>
|
<context>
|
||||||
<name>InitializationPage</name>
|
<name>InitializationPage</name>
|
||||||
|
|
|
@ -870,6 +870,14 @@
|
||||||
<source>You</source>
|
<source>You</source>
|
||||||
<translation>Sinä</translation>
|
<translation>Sinä</translation>
|
||||||
</message>
|
</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>
|
||||||
<context>
|
<context>
|
||||||
<name>InitializationPage</name>
|
<name>InitializationPage</name>
|
||||||
|
|
|
@ -855,6 +855,14 @@
|
||||||
<source>You</source>
|
<source>You</source>
|
||||||
<translation>Te</translation>
|
<translation>Te</translation>
|
||||||
</message>
|
</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>
|
||||||
<context>
|
<context>
|
||||||
<name>InitializationPage</name>
|
<name>InitializationPage</name>
|
||||||
|
|
|
@ -869,6 +869,14 @@
|
||||||
<source>You</source>
|
<source>You</source>
|
||||||
<translation>Tu</translation>
|
<translation>Tu</translation>
|
||||||
</message>
|
</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>
|
||||||
<context>
|
<context>
|
||||||
<name>InitializationPage</name>
|
<name>InitializationPage</name>
|
||||||
|
|
|
@ -883,6 +883,14 @@
|
||||||
<source>You</source>
|
<source>You</source>
|
||||||
<translation>Ty</translation>
|
<translation>Ty</translation>
|
||||||
</message>
|
</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>
|
||||||
<context>
|
<context>
|
||||||
<name>InitializationPage</name>
|
<name>InitializationPage</name>
|
||||||
|
|
|
@ -886,6 +886,14 @@
|
||||||
<source>You</source>
|
<source>You</source>
|
||||||
<translation>Вы</translation>
|
<translation>Вы</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Unknown</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>This message was deleted</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>InitializationPage</name>
|
<name>InitializationPage</name>
|
||||||
|
|
|
@ -883,6 +883,14 @@
|
||||||
<source>You</source>
|
<source>You</source>
|
||||||
<translation>Ja</translation>
|
<translation>Ja</translation>
|
||||||
</message>
|
</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>
|
||||||
<context>
|
<context>
|
||||||
<name>InitializationPage</name>
|
<name>InitializationPage</name>
|
||||||
|
|
|
@ -869,6 +869,14 @@
|
||||||
<source>You</source>
|
<source>You</source>
|
||||||
<translation>Du</translation>
|
<translation>Du</translation>
|
||||||
</message>
|
</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>
|
||||||
<context>
|
<context>
|
||||||
<name>InitializationPage</name>
|
<name>InitializationPage</name>
|
||||||
|
|
|
@ -856,6 +856,14 @@
|
||||||
<source>You</source>
|
<source>You</source>
|
||||||
<translation>你</translation>
|
<translation>你</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Unknown</source>
|
||||||
|
<translation type="unfinished">未知</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>This message was deleted</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>InitializationPage</name>
|
<name>InitializationPage</name>
|
||||||
|
|
|
@ -869,6 +869,14 @@
|
||||||
<source>You</source>
|
<source>You</source>
|
||||||
<translation>You</translation>
|
<translation>You</translation>
|
||||||
</message>
|
</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>
|
||||||
<context>
|
<context>
|
||||||
<name>InitializationPage</name>
|
<name>InitializationPage</name>
|
||||||
|
|
Loading…
Reference in a new issue