Check whether it needs to request auth or not AFTER the user gets back to the app

OmarHatem committed Dec 15, 2022 at 14:14 UTC f9566cf33e6fc2496644b2d6a9b247f79b4afd2d
1 file changed +5 -4
lib/src/screens/root/root.dart
+5 -4
@@ -91,14 +91,15 @@ class RootState extends State<Root> with WidgetsBindingObserver {
91 return;
92 }
93
94 - setState(() {
95 - _requestAuth = widget.authService.requireAuth();
96 - });
97 -
94 if (!_isInactive && widget.authenticationStore.state == AuthenticationState.allowed) {
95 setState(() => _setInactive(true));
96 }
97
98 + break;
99 + case AppLifecycleState.resumed:
100 + setState(() {
101 + _requestAuth = widget.authService.requireAuth();
102 + });
103 break;
104 default:
105 break;