mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Added ability to prevent application lock and account switch.
This commit is contained in:
@@ -221,6 +221,13 @@ QPixmap MainWindow::grabInner() {
|
||||
return {};
|
||||
}
|
||||
|
||||
void MainWindow::preventOrInvoke(Fn<void()> callback) {
|
||||
if (_main && _main->preventsCloseSection(callback)) {
|
||||
return;
|
||||
}
|
||||
callback();
|
||||
}
|
||||
|
||||
void MainWindow::setupPasscodeLock() {
|
||||
auto animated = (_main || _intro);
|
||||
auto bg = animated ? grabInner() : QPixmap();
|
||||
|
Reference in New Issue
Block a user