2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-03 16:15:13 +00:00

Cloud draft handling improved. Fixed Edit while already editing a msg.

This commit is contained in:
John Preston
2016-06-09 17:31:10 +03:00
parent 19cacd0efb
commit a428534345
14 changed files with 197 additions and 145 deletions

View File

@@ -25,6 +25,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "serialize/serialize_document.h"
#include "serialize/serialize_common.h"
#include "data/data_drafts.h"
#include "observer_peer.h"
#include "mainwidget.h"
#include "mainwindow.h"
@@ -2409,13 +2410,13 @@ namespace Local {
if (msgData.text.isEmpty() && !msgReplyTo) {
h->clearLocalDraft();
} else {
h->setLocalDraft(std_::make_unique<HistoryDraft>(msgData, msgReplyTo, msgCursor, msgPreviewCancelled));
h->setLocalDraft(std_::make_unique<Data::Draft>(msgData, msgReplyTo, msgCursor, msgPreviewCancelled));
}
}
if (!editMsgId) {
h->clearEditDraft();
} else {
h->setEditDraft(std_::make_unique<HistoryDraft>(editData, editMsgId, editCursor, editPreviewCancelled));
h->setEditDraft(std_::make_unique<Data::Draft>(editData, editMsgId, editCursor, editPreviewCancelled));
}
}