2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 07:35:12 +00:00

Initial support of separate windows for accounts.

This commit is contained in:
John Preston
2023-01-17 19:47:58 +04:00
parent 86ed2745e3
commit 7023b013ce
32 changed files with 323 additions and 143 deletions

View File

@@ -1214,10 +1214,22 @@ bool MainWidget::showHistoryInDifferentWindow(
showAtMsgId);
separate->activate();
return true;
} else if (isPrimary() || (singlePeer()->id == peerId)) {
} else if (isPrimary()) {
const auto primary = Core::App().separateWindowForAccount(
&peer->account());
if (primary != &_controller->window()) {
primary->sessionController()->showPeerHistory(
peerId,
params,
showAtMsgId);
primary->activate();
return true;
}
return false;
} else if (singlePeer()->id == peerId) {
return false;
}
const auto primary = Core::App().primaryWindow();
const auto primary = Core::App().activePrimaryWindow();
if (&primary->account() != &session().account()) {
primary->showAccount(&session().account());
}