Avoid saving drafts for deleted users, fixes #439
This commit is contained in:
parent
02573e8d4e
commit
5309dda94b
14 changed files with 58 additions and 2 deletions
|
@ -44,6 +44,7 @@ Page {
|
|||
property bool isBasicGroup: false;
|
||||
property bool isSuperGroup: false;
|
||||
property bool isChannel: false;
|
||||
property bool isDeletedUser: false;
|
||||
property bool containsSponsoredMessages: false;
|
||||
property var chatPartnerInformation;
|
||||
property var botInformation;
|
||||
|
@ -117,10 +118,13 @@ Page {
|
|||
statusText += secretChatStatus;
|
||||
}
|
||||
}
|
||||
|
||||
if (statusText) {
|
||||
chatStatusText.text = statusText;
|
||||
}
|
||||
if (chatPartnerInformation.type['@type'] === "userTypeDeleted") {
|
||||
chatNameText.text = qsTr("Deleted User");
|
||||
chatPage.isDeletedUser = true;
|
||||
}
|
||||
}
|
||||
|
||||
function updateGroupStatusText() {
|
||||
|
@ -433,7 +437,7 @@ Page {
|
|||
}
|
||||
|
||||
Component.onDestruction: {
|
||||
if (chatPage.canSendMessages) {
|
||||
if (chatPage.canSendMessages && !chatPage.isDeletedUser) {
|
||||
tdLibWrapper.setChatDraftMessage(chatInformation.id, 0, newMessageColumn.replyToMessageId, newMessageTextField.text);
|
||||
}
|
||||
fernschreiberUtils.stopGeoLocationUpdates();
|
||||
|
|
|
@ -530,6 +530,10 @@
|
|||
<source>Delete Chat</source>
|
||||
<translation>Chat löschen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Deleted User</source>
|
||||
<translation>Gelöschtes Konto</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ChatSelectionPage</name>
|
||||
|
|
|
@ -530,6 +530,10 @@
|
|||
<source>Delete Chat</source>
|
||||
<translation>Delete Chat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Deleted User</source>
|
||||
<translation>Deleted User</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ChatSelectionPage</name>
|
||||
|
|
|
@ -530,6 +530,10 @@
|
|||
<source>Delete Chat</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Deleted User</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ChatSelectionPage</name>
|
||||
|
|
|
@ -530,6 +530,10 @@
|
|||
<source>Delete Chat</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Deleted User</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ChatSelectionPage</name>
|
||||
|
|
|
@ -530,6 +530,10 @@
|
|||
<source>Delete Chat</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Deleted User</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ChatSelectionPage</name>
|
||||
|
|
|
@ -520,6 +520,10 @@
|
|||
<source>Delete Chat</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Deleted User</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ChatSelectionPage</name>
|
||||
|
|
|
@ -530,6 +530,10 @@
|
|||
<source>Delete Chat</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Deleted User</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ChatSelectionPage</name>
|
||||
|
|
|
@ -540,6 +540,10 @@
|
|||
<source>Delete Chat</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Deleted User</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ChatSelectionPage</name>
|
||||
|
|
|
@ -540,6 +540,10 @@
|
|||
<source>Delete Chat</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Deleted User</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ChatSelectionPage</name>
|
||||
|
|
|
@ -540,6 +540,10 @@
|
|||
<source>Delete Chat</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Deleted User</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ChatSelectionPage</name>
|
||||
|
|
|
@ -530,6 +530,10 @@
|
|||
<source>Delete Chat</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Deleted User</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ChatSelectionPage</name>
|
||||
|
|
|
@ -520,6 +520,10 @@
|
|||
<source>Delete Chat</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Deleted User</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ChatSelectionPage</name>
|
||||
|
|
|
@ -530,6 +530,10 @@
|
|||
<source>Delete Chat</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Deleted User</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ChatSelectionPage</name>
|
||||
|
|
Loading…
Reference in a new issue