Fix controls layout after adding a bot to a group.

Fixes https://bugs.telegram.org/c/19451
This commit is contained in:
John Preston 2024-09-04 14:56:50 +04:00
parent 5a2667c71e
commit 20a5e0ba73

View file

@ -6469,8 +6469,11 @@ void HistoryWidget::updateBotKeyboard(History *h, bool force) {
: nullptr; : nullptr;
changed = _keyboard->updateMarkup(keyboardItem, force); changed = _keyboard->updateMarkup(keyboardItem, force);
} }
updateCmdStartShown(); const auto controlsChanged = updateCmdStartShown();
if (!changed) { if (!changed) {
if (controlsChanged) {
updateControlsGeometry();
}
return; return;
} else if (_keyboard->forMsgId() != wasMsgId) { } else if (_keyboard->forMsgId() != wasMsgId) {
_kbScroll->scrollTo({ 0, 0 }); _kbScroll->scrollTo({ 0, 0 });