From 085eef15c22c961c58b29eff60e566b7c0ac8f63 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 9 Dec 2020 15:50:40 +0400 Subject: [PATCH] Revert "Fixed draft applying while recording voice message in HistoryWidget." This reverts commit 346547c23d21ae5f25befac3ab736610ed3e0e7a. Fixes #9871. --- .../SourceFiles/history/history_widget.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index a03f8e27b..4edbefdb7 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -821,13 +821,6 @@ void HistoryWidget::initVoiceRecordBar() { }, lifetime()); _voiceRecordBar->hideFast(); - - _voiceRecordBar->shownValue( - ) | rpl::start_with_next([=](bool shown) { - if (!shown) { - applyDraft(); - } - }, lifetime()); } void HistoryWidget::initTabbedSelector() { @@ -2089,15 +2082,8 @@ bool HistoryWidget::contentOverlapped(const QRect &globalRect) { } bool HistoryWidget::canWriteMessage() const { - if (!_history || !_canSendMessages) { - return false; - } - if (isBlocked() || isJoinChannel() || isMuteUnmute() || isBotStart()) { - return false; - } - if (!_voiceRecordBar->isHidden()) { - return false; - } + if (!_history || !_canSendMessages) return false; + if (isBlocked() || isJoinChannel() || isMuteUnmute() || isBotStart()) return false; return true; }