diff --git a/src/app/mainview/components/ChatViewFooter.qml b/src/app/mainview/components/ChatViewFooter.qml index ade0774dd3aa415e6fdac62dea5881e4955d0a45..a2f161971aad4819ce38b458467d2befc84d87a4 100644 --- a/src/app/mainview/components/ChatViewFooter.qml +++ b/src/app/mainview/components/ChatViewFooter.qml @@ -31,6 +31,7 @@ Rectangle { property alias textInput: messageBar.textAreaObj property string previousConvId: "" + property string previousAccountId: "" function setFilePathsToSend(filePaths) { for (var index = 0; index < filePaths.length; ++index) { @@ -48,8 +49,8 @@ Rectangle { function onSelectedConvUidChanged() { // Handle Draft - if (previousConvId !== "") { - LRCInstance.setContentDraft(previousConvId, LRCInstance.currentAccountId, + if (previousConvId !== "" && previousAccountId != "") { + LRCInstance.setContentDraft(previousConvId, previousAccountId, messageBar.text); } @@ -58,6 +59,7 @@ Rectangle { messageBar.textAreaObj.clearText() previousConvId = LRCInstance.selectedConvUid + previousAccountId = LRCInstance.currentAccountId var restoredContent = LRCInstance.getContentDraft(LRCInstance.selectedConvUid, LRCInstance.currentAccountId);