Revert "Fixed draft applying while recording voice message in HistoryWidget."

This reverts commit 346547c23d.

Fixes #9871.
This commit is contained in:
John Preston 2020-12-09 15:50:40 +04:00
parent 7f7ac64c6d
commit 085eef15c2

View file

@ -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;
}