2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Fix account activation after window closing.

This commit is contained in:
John Preston
2023-01-23 09:29:35 +04:00
parent 58cedb796e
commit 5278ed1f41
2 changed files with 8 additions and 3 deletions

View File

@@ -1344,6 +1344,12 @@ void Application::closeWindow(not_null<Window::Controller*> window) {
++i;
}
}
const auto account = domain().started()
? &domain().active()
: nullptr;
if (account && !_primaryWindows.contains(account) && _lastActiveWindow) {
domain().activate(&_lastActiveWindow->account());
}
}
void Application::closeChatFromWindows(not_null<PeerData*> peer) {