From ef5055f4f3a37ba7419a23ad9ed330daa1a0b12f Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Sun, 26 Jan 2020 02:22:30 +0300 Subject: [PATCH] Fixed missing reply cancel after sending scheduled message. --- Telegram/SourceFiles/history/history_widget.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index a1b97298c..993a5f094 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -647,16 +647,17 @@ HistoryWidget::HistoryWidget( ) | rpl::filter([=](const Api::SendAction &action) { return (action.history == _history); }) | rpl::start_with_next([=](const Api::SendAction &action) { + const auto lastKeyboardUsed = lastForceReplyReplied(FullMsgId( + action.history->channelId(), + action.replyTo)); if (action.options.scheduled) { + cancelReply(lastKeyboardUsed); crl::on_main(this, [=, history = action.history]{ controller->showSection( HistoryView::ScheduledMemento(history)); }); } else { fastShowAtEnd(action.history); - const auto lastKeyboardUsed = lastForceReplyReplied(FullMsgId( - action.history->channelId(), - action.replyTo)); if (cancelReply(lastKeyboardUsed) && !action.clearDraft) { onCloudDraftSave(); }