mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Fixed logging out with opened non-primary windows.
This commit is contained in:
@@ -561,7 +561,8 @@ void MainWindow::updateGlobalMenuHook() {
|
||||
updateIsActive();
|
||||
const auto logged = (sessionController() != nullptr);
|
||||
const auto inactive = !logged || controller().locked();
|
||||
const auto support = logged && account().session().supportMode();
|
||||
const auto support = logged
|
||||
&& sessionController()->session().supportMode();
|
||||
ForceDisabled(psLogout, !logged && !Core::App().passcodeLocked());
|
||||
ForceDisabled(psUndo, !canUndo);
|
||||
ForceDisabled(psRedo, !canRedo);
|
||||
|
@@ -519,7 +519,8 @@ void MainWindow::updateGlobalMenuHook() {
|
||||
updateIsActive();
|
||||
const auto logged = (sessionController() != nullptr);
|
||||
const auto inactive = !logged || controller().locked();
|
||||
const auto support = logged && account().session().supportMode();
|
||||
const auto support = logged
|
||||
&& sessionController()->session().supportMode();
|
||||
ForceDisabled(psLogout, !logged && !Core::App().passcodeLocked());
|
||||
ForceDisabled(psUndo, !canUndo);
|
||||
ForceDisabled(psRedo, !canRedo);
|
||||
|
@@ -96,7 +96,7 @@ void Controller::showAccount(
|
||||
|
||||
_account->sessionValue(
|
||||
) | rpl::start_with_next([=](Main::Session *session) {
|
||||
if (!session && !isPrimary()) {
|
||||
if (!isPrimary() && (&_singlePeer->session() != session)) {
|
||||
Core::App().closeWindow(this);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user