From 187f5fa4f38646bdaad2cc4da90f9baac1287b1a Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 9 Nov 2022 10:59:27 +0400 Subject: [PATCH] Fix emoji panel section appearance in topics. --- Telegram/SourceFiles/mainwidget.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 40cf7f0a0..067f138f4 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -1816,9 +1816,17 @@ void MainWidget::showNewSection( updateControlsGeometry(); } else { _mainSection = std::move(newMainSection); - updateControlsGeometry(); _history->finishAnimating(); _history->showHistory(0, 0); + + if (const auto entry = _mainSection->activeChat(); entry.key) { + _controller->setActiveChatEntry(entry); + } + + // Depends on SessionController::activeChatEntry + // for tabbed selector showing in the third column. + updateControlsGeometry(); + _history->hide(); if (isOneColumn() && _dialogs) { _dialogs->hide(); @@ -1838,12 +1846,6 @@ void MainWidget::showNewSection( settingSection->showFast(); } - if (settingSection.data() == _mainSection.data()) { - if (const auto entry = _mainSection->activeChat(); entry.key) { - _controller->setActiveChatEntry(entry); - } - } - floatPlayerCheckVisibility(); orderWidgets(); }