Fix lock screen temporarily showing even when app lock is not enabled

This commit is contained in:
Ming Ming 2024-06-20 23:50:35 +08:00
parent 01551d36fc
commit bd0e4fd342

View file

@ -21,6 +21,10 @@ class _AppLockMyAppState extends State<_AppLockMyApp> {
SessionStorage().lastSuspendTime = clock.now(); SessionStorage().lastSuspendTime = clock.now();
}, },
onShow: () async { onShow: () async {
if (context.read<SecurePrefController>().protectedPageAuthTypeValue ==
null) {
return;
}
final now = clock.now(); final now = clock.now();
final diff = now.difference(SessionStorage().lastSuspendTime); final diff = now.difference(SessionStorage().lastSuspendTime);
_log.info("Suspended for: $diff"); _log.info("Suspended for: $diff");