1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-07-18 22:45:25 +02:00

SidePanel: wrong conversation draft when account is changed

Change-Id: I7f6c6bca2cb5dd17a864c3da66a9e5e3a15400dc
GitLab: #913
This commit is contained in:
Nicolas Vengeon 2022-12-22 14:18:50 -05:00 committed by Sébastien Blin
parent 03d310fc9f
commit c360be0b95

View file

@ -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);