mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 22:27:20 +02:00
Fix crash on local edit draft, fix reading drafts.
This commit is contained in:
parent
f13a2517cd
commit
c6aba83a6b
2 changed files with 4 additions and 3 deletions
|
@ -1954,7 +1954,8 @@ void HistoryWidget::applyDraft(FieldHistoryAction fieldHistoryAction) {
|
|||
requestMessageData(_editMsgId);
|
||||
}
|
||||
} else if (!readyToForward()) {
|
||||
_processingReplyId = _history->localDraft({})->msgId;
|
||||
const auto draft = _history->localDraft({});
|
||||
_processingReplyId = draft ? draft->msgId : MsgId();
|
||||
processReply();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1363,8 +1363,8 @@ void Account::readDraftsWithCursors(not_null<History*> history) {
|
|||
for (auto i = 0; i != count; ++i) {
|
||||
TextWithTags data;
|
||||
QByteArray tagsSerialized;
|
||||
qint64 keyValue = 0;
|
||||
qint32 keyValueOld = 0, messageId = 0, uncheckedPreviewState = 0;
|
||||
qint64 keyValue = 0, messageId = 0;
|
||||
qint32 keyValueOld = 0, uncheckedPreviewState = 0;
|
||||
if (keysOld) {
|
||||
draft.stream >> keyValueOld;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue