Made discussion group open in same non-primary window as its channel.

This commit is contained in:
23rd
2026-06-24 08:52:16 +03:00
parent b023fd2587
commit a2f2db30f6
3 changed files with 6 additions and 2 deletions
@@ -922,9 +922,10 @@ void TopBar::setupActions(not_null<Window::SessionController*> controller) {
tr::lng_channel_invite_private(tr::now));
return;
}
controller->showPeerHistory(
chat,
auto params = Window::SectionShow(
Window::SectionShow::Way::Forward);
params.preferCurrentWindow = true;
controller->showPeerHistory(chat, params);
});
discuss->setAccessibleName(tr::lng_profile_action_short_discuss(tr::now));
_actions->add(discuss);
+2
View File
@@ -1354,6 +1354,8 @@ bool MainWidget::showHistoryInDifferentWindow(
return true;
} else if (windowId().hasChatsList()) {
return false;
} else if (params.preferCurrentWindow) {
return false;
}
const auto account = not_null(&session().account());
auto primary = Core::App().separateWindowFor(account);
@@ -211,6 +211,7 @@ struct SectionShow {
bool childColumn = false;
bool forbidLayer = false;
bool forceTopicsList = false;
bool preferCurrentWindow = false;
bool reapplyLocalDraft = false;
bool dropSameFromStack = false;
bool allowDuplicateInStack = false;