mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 15:45:12 +00:00
Allow opening new account in a separate window.
This commit is contained in:
@@ -1294,7 +1294,7 @@ bool MainWidget::showHistoryInDifferentWindow(
|
||||
return true;
|
||||
}
|
||||
|
||||
void MainWidget::showPeerHistory(
|
||||
void MainWidget::showHistory(
|
||||
PeerId peerId,
|
||||
const SectionShow ¶ms,
|
||||
MsgId showAtMsgId) {
|
||||
@@ -1311,6 +1311,7 @@ void MainWidget::showPeerHistory(
|
||||
Assert(isPrimary());
|
||||
if (params.activation != anim::activation::background) {
|
||||
_controller->show(Ui::MakeInformBox(unavailable));
|
||||
_controller->window().activate();
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1324,9 +1325,13 @@ void MainWidget::showPeerHistory(
|
||||
return;
|
||||
}
|
||||
|
||||
if (peerId && params.activation != anim::activation::background) {
|
||||
_controller->window().activate();
|
||||
}
|
||||
|
||||
if (!(_history->peer() && _history->peer()->id == peerId)
|
||||
&& preventsCloseSection(
|
||||
[=] { showPeerHistory(peerId, params, showAtMsgId); },
|
||||
[=] { showHistory(peerId, params, showAtMsgId); },
|
||||
params)) {
|
||||
return;
|
||||
}
|
||||
@@ -1490,7 +1495,7 @@ void MainWidget::showMessage(
|
||||
return;
|
||||
}
|
||||
} else if (_history->peer() == item->history()->peer) {
|
||||
showPeerHistory(peerId, params, itemId);
|
||||
showHistory(peerId, params, itemId);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user