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:
@@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user