Hide reply keyboard if started typing.

This commit is contained in:
John Preston 2022-06-22 20:15:50 +04:00
parent 1e63a6a1a7
commit 73af96e9c3
2 changed files with 7 additions and 0 deletions

View File

@ -1597,6 +1597,12 @@ void HistoryWidget::fieldChanged() {
updateSendButtonType();
if (!HasSendText(_field)) {
_previewState = Data::PreviewState::Allowed;
_fieldIsEmpty = true;
} else if (_fieldIsEmpty) {
_fieldIsEmpty = false;
if (_kbShown) {
toggleKeyboard();
}
}
if (updateCmdStartShown()) {
updateControlsVisibility();

View File

@ -743,6 +743,7 @@ private:
bool _inClickable = false;
bool _kbShown = false;
bool _fieldIsEmpty = true;
HistoryItem *_kbReplyTo = nullptr;
object_ptr<Ui::ScrollArea> _kbScroll;
const not_null<BotKeyboard*> _keyboard;