mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Added ability to prevent application lock and account switch.
This commit is contained in:
@@ -789,9 +789,17 @@ bool Application::openCustomUrl(
|
||||
|
||||
}
|
||||
|
||||
void Application::preventOrInvoke(Fn<void()> &&callback) {
|
||||
_window->preventOrInvoke(std::move(callback));
|
||||
}
|
||||
|
||||
void Application::lockByPasscode() {
|
||||
_passcodeLock = true;
|
||||
_window->setupPasscodeLock();
|
||||
preventOrInvoke([=] {
|
||||
if (_window) {
|
||||
_passcodeLock = true;
|
||||
_window->setupPasscodeLock();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void Application::unlockPasscode() {
|
||||
|
Reference in New Issue
Block a user