mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Move terms lock from Core::App to Session.
This commit is contained in:
@@ -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);
|
||||
|
@@ -24,6 +24,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "storage/localstorage.h"
|
||||
#include "window/notifications_manager_default.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/themes/window_theme.h"
|
||||
#include "platform/mac/mac_touchbar.h"
|
||||
#include "platform/platform_notifications_manager.h"
|
||||
@@ -835,10 +836,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);
|
||||
|
Reference in New Issue
Block a user