mirror of
https://github.com/telegramdesktop/tdesktop
synced 2024-12-26 16:43:33 +00:00
Fixed draft applying while recording voice message in HistoryWidget.
This commit is contained in:
parent
7b837e5138
commit
346547c23d
@ -821,6 +821,13 @@ void HistoryWidget::initVoiceRecordBar() {
|
||||
}, lifetime());
|
||||
|
||||
_voiceRecordBar->hideFast();
|
||||
|
||||
_voiceRecordBar->shownValue(
|
||||
) | rpl::start_with_next([=](bool shown) {
|
||||
if (!shown) {
|
||||
applyDraft();
|
||||
}
|
||||
}, lifetime());
|
||||
}
|
||||
|
||||
void HistoryWidget::initTabbedSelector() {
|
||||
@ -2082,8 +2089,15 @@ bool HistoryWidget::contentOverlapped(const QRect &globalRect) {
|
||||
}
|
||||
|
||||
bool HistoryWidget::canWriteMessage() const {
|
||||
if (!_history || !_canSendMessages) return false;
|
||||
if (isBlocked() || isJoinChannel() || isMuteUnmute() || isBotStart()) return false;
|
||||
if (!_history || !_canSendMessages) {
|
||||
return false;
|
||||
}
|
||||
if (isBlocked() || isJoinChannel() || isMuteUnmute() || isBotStart()) {
|
||||
return false;
|
||||
}
|
||||
if (!_voiceRecordBar->isHidden()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user