From a923829ba1adc4d2daf371963e4dfc2216b74b18 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 7 Dec 2015 21:38:09 +0300 Subject: [PATCH] fixing migrated history draft usage --- Telegram/SourceFiles/historywidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index dddec35fd..02762346c 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -3216,6 +3216,7 @@ void HistoryWidget::showHistory(const PeerId &peerId, MsgId showAtMsgId, bool re if (_history) { _history->draft = _field.getLastText(); + if (_migrated) _migrated->draft = QString(); // use migrated draft only once _history->draftCursor.fillFrom(_field); _history->draftToId = _replyToId; _history->draftPreviewCancelled = _previewCancelled; @@ -3325,6 +3326,7 @@ void HistoryWidget::showHistory(const PeerId &peerId, MsgId showAtMsgId, bool re _history->draftCursor = _migrated->draftCursor; _history->draftPreviewCancelled = _migrated->draftPreviewCancelled; _history->draftToId = 0; + _migrated->draft = QString(); // use migrated draft only once applyDraft(false); _replyToId = 0; } else {