Make clearing reply not remove your text

This commit is contained in:
Jan Bidler
2022-08-25 13:52:10 +02:00
committed by Carl Schwan
parent 57b1bb659c
commit 3c98a8fac4
2 changed files with 3 additions and 2 deletions

View File

@@ -106,7 +106,7 @@ Loader {
text: i18n("Cancel")
display: AbstractButton.IconOnly
onClicked: {
ChatBoxHelper.clearEditReply();
ChatBoxHelper.clear();
root.replyCancelled();
}
ToolTip.text: text

View File

@@ -131,8 +131,8 @@ void ChatBoxHelper::clear()
setEditContent(QString());
setReplyEventId(QString());
setReplyEventContent(QString());
setAttachmentPath(QString());
setReplyUser(QVariant());
setAttachmentPath(QString());
}
void ChatBoxHelper::edit(const QString &message, const QString &formattedBody, const QString &eventId)
@@ -149,6 +149,7 @@ void ChatBoxHelper::clearEditReply()
setReplyEventId(QString());
setReplyEventContent(QString());
setReplyUser(QVariant());
setAttachmentPath(QString());
Q_EMIT shouldClearText();
}