mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Improved Controller::invokeForSessionController for separate windows.
This commit is contained in:
parent
caef698e54
commit
a32b781e49
1 changed files with 9 additions and 0 deletions
|
@ -499,6 +499,15 @@ void Controller::invokeForSessionController(
|
|||
if (separateSession) {
|
||||
return callback(separateSession);
|
||||
}
|
||||
const auto accountWindow = account
|
||||
? Core::App().separateWindowFor(not_null(account))
|
||||
: nullptr;
|
||||
const auto accountSession = accountWindow
|
||||
? accountWindow->sessionController()
|
||||
: nullptr;
|
||||
if (accountSession) {
|
||||
return callback(accountSession);
|
||||
}
|
||||
_id.account->domain().activate(std::move(account));
|
||||
if (_sessionController) {
|
||||
callback(_sessionController.get());
|
||||
|
|
Loading…
Add table
Reference in a new issue