Skip to content
Snippets Groups Projects
Commit c360be0b authored by Nicolas Vengeon's avatar Nicolas Vengeon Committed by Sébastien Blin
Browse files

SidePanel: wrong conversation draft when account is changed

Change-Id: I7f6c6bca2cb5dd17a864c3da66a9e5e3a15400dc
GitLab: #913
parent 03d310fc
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment