2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Move terms lock from Core::App to Session.

This commit is contained in:
John Preston
2020-06-24 11:56:16 +04:00
parent 30c82bb2e0
commit e7b8a52278
19 changed files with 233 additions and 272 deletions

View File

@@ -23,6 +23,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "boxes/about_box.h"
#include "lang/lang_keys.h"
#include "storage/localstorage.h"
#include "window/window_controller.h"
#include "window/window_session_controller.h"
#include "ui/widgets/input_fields.h"
#include "facades.h"
@@ -1027,10 +1028,9 @@ void MainWindow::updateGlobalMenuHook() {
}
App::wnd()->updateIsActive();
const auto logged = account().sessionExists();
const auto locked = Core::App().locked();
const auto inactive = !logged || locked;
const auto inactive = !logged || controller().locked();
const auto support = logged && account().session().supportMode();
ForceDisabled(psLogout, !logged && !locked);
ForceDisabled(psLogout, !logged && !Core::App().passcodeLocked());
ForceDisabled(psUndo, !canUndo);
ForceDisabled(psRedo, !canRedo);
ForceDisabled(psCut, !canCut);