Skip to content

Commit

Permalink
Unlock Screen automatic authentication popup fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
GleammerRay committed Mar 20, 2024
1 parent 4e947c4 commit 33af8c1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/screens/unlock_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,13 @@ class _UnlockScreen extends State<UnlockScreen> with WidgetsBindingObserver {
@override
void didChangeAppLifecycleState(AppLifecycleState state) async {
super.didChangeAppLifecycleState(state);
if (_unlockScreenOn) return;
if (_unlockScreenOn) {
if (state == AppLifecycleState.resumed) {
_passwordFocus.requestFocus();
await _bioAuth();
}
return;
}
if (!UnlockScreen.shouldLockScreen) return;
LoadedAccount? account = data.loadedAccount;
if (account == null) return;
Expand All @@ -136,10 +142,6 @@ class _UnlockScreen extends State<UnlockScreen> with WidgetsBindingObserver {
if ((state != AppLifecycleState.resumed) &&
(state != AppLifecycleState.inactive)) return;
setState(() => _unlockScreenOn = true);
if (state == AppLifecycleState.resumed) {
_passwordFocus.requestFocus();
await _bioAuth();
}
}

@override
Expand Down

0 comments on commit 33af8c1

Please sign in to comment.