mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Improved Controller::invokeForSessionController for separate windows.
This commit is contained in:
@@ -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());
|
||||
|
Reference in New Issue
Block a user