Skip to content

Commit b7415c8

Browse files
meh7anjohn-preston
authored andcommitted
Fix a forum opened in a new window showing the chat list
A new window shows its forum while it is being created, before it is added to the application's windows. showForumInDifferentWindow() then looked for a window showing that forum and, if the window it was opened from already showed it, showed the forum there, so the new window was left with the chat list. A window opened for a forum now always shows that forum itself.
1 parent 31f3324 commit b7415c8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎Telegram/SourceFiles/window/window_session_controller.cpp‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2188,6 +2188,9 @@ bool SessionController::showForumInDifferentWindow(
21882188
not_null<Data::Forum*> forum,
21892189
const SectionShow &params,
21902190
MsgId showAtMsgId) {
2191+
if (windowId().forum() == forum) {
2192+
return false;
2193+
}
21912194
const auto window = Core::App().windowForShowingForum(forum);
21922195
if (window == _window) {
21932196
return false;

0 commit comments

Comments
 (0)