From f9566cf33e6fc2496644b2d6a9b247f79b4afd2d Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Thu, 15 Dec 2022 14:14:54 +0200 Subject: [PATCH] Check whether it needs to request auth or not AFTER the user gets back to the app --- lib/src/screens/root/root.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/src/screens/root/root.dart b/lib/src/screens/root/root.dart index 0ab1c23c1..f69a63d04 100644 --- a/lib/src/screens/root/root.dart +++ b/lib/src/screens/root/root.dart @@ -91,14 +91,15 @@ class RootState extends State with WidgetsBindingObserver { return; } - setState(() { - _requestAuth = widget.authService.requireAuth(); - }); - if (!_isInactive && widget.authenticationStore.state == AuthenticationState.allowed) { setState(() => _setInactive(true)); } + break; + case AppLifecycleState.resumed: + setState(() { + _requestAuth = widget.authService.requireAuth(); + }); break; default: break;