From 20a5e0ba7329383769717a5f94eeedfc8b18a865 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 4 Sep 2024 14:56:50 +0400 Subject: [PATCH] Fix controls layout after adding a bot to a group. Fixes https://bugs.telegram.org/c/19451 --- Telegram/SourceFiles/history/history_widget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 957b76b4d..573f130fc 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -6469,8 +6469,11 @@ void HistoryWidget::updateBotKeyboard(History *h, bool force) { : nullptr; changed = _keyboard->updateMarkup(keyboardItem, force); } - updateCmdStartShown(); + const auto controlsChanged = updateCmdStartShown(); if (!changed) { + if (controlsChanged) { + updateControlsGeometry(); + } return; } else if (_keyboard->forMsgId() != wasMsgId) { _kbScroll->scrollTo({ 0, 0 });