From 7f7e7b94d61b00a6f6eab783a854307407477eb2 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 15 Dec 2020 12:21:00 +0400 Subject: [PATCH] Fix Escape in comments section. --- .../view/controls/history_view_compose_controls.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp index 623fe13cea..b836c68c8b 100644 --- a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp +++ b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp @@ -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({});