mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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);
|
requestMessageData(_editMsgId);
|
||||||
}
|
}
|
||||||
} else if (!readyToForward()) {
|
} else if (!readyToForward()) {
|
||||||
_processingReplyId = _history->localDraft({})->msgId;
|
const auto draft = _history->localDraft({});
|
||||||
|
_processingReplyId = draft ? draft->msgId : MsgId();
|
||||||
processReply();
|
processReply();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1363,8 +1363,8 @@ void Account::readDraftsWithCursors(not_null<History*> history) {
|
||||||
for (auto i = 0; i != count; ++i) {
|
for (auto i = 0; i != count; ++i) {
|
||||||
TextWithTags data;
|
TextWithTags data;
|
||||||
QByteArray tagsSerialized;
|
QByteArray tagsSerialized;
|
||||||
qint64 keyValue = 0;
|
qint64 keyValue = 0, messageId = 0;
|
||||||
qint32 keyValueOld = 0, messageId = 0, uncheckedPreviewState = 0;
|
qint32 keyValueOld = 0, uncheckedPreviewState = 0;
|
||||||
if (keysOld) {
|
if (keysOld) {
|
||||||
draft.stream >> keyValueOld;
|
draft.stream >> keyValueOld;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue