Fix Escape in comments section.

This commit is contained in:
John Preston 2020-12-15 12:21:00 +04:00
parent df9d19b16a
commit 7f7e7b94d6
1 changed files with 9 additions and 1 deletions

View File

@ -796,6 +796,9 @@ void ComposeControls::showStarted() {
if (_voiceRecordBar) {
_voiceRecordBar->hideFast();
}
if (_autocomplete) {
_autocomplete->hideFast();
}
_wrap->hide();
_writeRestricted->hide();
}
@ -810,6 +813,9 @@ void ComposeControls::showFinished() {
if (_voiceRecordBar) {
_voiceRecordBar->hideFast();
}
if (_autocomplete) {
_autocomplete->hideFast();
}
updateWrappingVisibility();
_voiceRecordBar->orderControls();
}
@ -1154,6 +1160,8 @@ void ComposeControls::initAutocomplete() {
_autocomplete.get(),
[=] { checkAutocomplete(); },
Qt::QueuedConnection);
_autocomplete->hideFast();
}
void ComposeControls::updateStickersByEmoji() {
@ -1712,7 +1720,7 @@ void ComposeControls::paintBackground(QRect clip) {
}
void ComposeControls::escape() {
if (auto &voice = _voiceRecordBar; !voice->isActive()) {
if (const auto voice = _voiceRecordBar.get(); voice->isActive()) {
voice->showDiscardBox(nullptr, anim::type::normal);
} else {
_cancelRequests.fire({});