Fix bug in setting showingLockScreen flag

This commit is contained in:
Neeraj Gupta 2023-11-14 10:35:00 +05:30
parent 90193eaed9
commit 572417d3aa

View file

@ -73,7 +73,8 @@ class _LockScreenState extends State<LockScreen> with WidgetsBindingObserver {
if (!_hasAuthenticationFailed && !didAuthInLast5Seconds) {
// Show the lock screen again only if the app is resuming from the
// background, and not when the lock screen was explicitly dismissed
_showLockScreen(source: "lifeCycle");
Future.delayed(
Duration.zero, () => _showLockScreen(source: "lifeCycle"));
} else {
_hasAuthenticationFailed = false; // Reset failure state
}
@ -117,6 +118,7 @@ class _LockScreenState extends State<LockScreen> with WidgetsBindingObserver {
}
}
} catch (e, s) {
_isShowingLockScreen = false;
_logger.severe(e, s);
}
}