mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-06 03:42:56 +00:00
Made discussion group open in same non-primary window as its channel.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user