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

Removed LocalPasscode global variable from facades.

This commit is contained in:
23rd
2021-05-25 23:38:01 +03:00
parent 7852c82eab
commit 54dd63d61a
13 changed files with 74 additions and 51 deletions

View File

@@ -321,8 +321,6 @@ void Application::startDomain() {
startSettingsAndBackground();
}
if (state != Storage::StartResult::Success) {
Global::SetLocalPasscode(true);
Global::RefLocalPasscodeChanged().notify();
lockByPasscode();
DEBUG_LOG(("Application Info: passcode needed..."));
}
@@ -910,7 +908,7 @@ bool Application::someSessionExists() const {
}
void Application::checkAutoLock() {
if (!Global::LocalPasscode()
if (!_domain->local().hasLocalPasscode()
|| passcodeLocked()
|| !someSessionExists()) {
_shouldLockAt = 0;
@@ -1146,7 +1144,7 @@ void Application::startShortcuts() {
return true;
});
request->check(Command::Lock) && request->handle([=] {
if (!passcodeLocked() && Global::LocalPasscode()) {
if (!passcodeLocked() && _domain->local().hasLocalPasscode()) {
lockByPasscode();
return true;
}