π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[auth] Sync frequently to identify logout early
Neeraj Gupta753801c401b2
diff --git a/auth/lib/app/view/app.dart b/auth/lib/app/view/app.dartindex 5053f70f12..405ab977ab 100644--- a/auth/lib/app/view/app.dart+++ b/auth/lib/app/view/app.dart@@ -10,6 +10,7 @@ import 'package:ente_auth/events/signed_out_event.dart';import "package:ente_auth/l10n/l10n.dart";import 'package:ente_auth/locale.dart';import "package:ente_auth/onboarding/view/onboarding_page.dart";+import 'package:ente_auth/services/authenticator_service.dart';import 'package:ente_auth/services/update_service.dart';import 'package:ente_auth/services/user_service.dart';import 'package:ente_auth/services/window_listener_service.dart';@@ -34,7 +35,8 @@ class App extends StatefulWidget {State<App> createState() => _AppState();}-class _AppState extends State<App> with WindowListener, TrayListener {+class _AppState extends State<App>+ with WindowListener, TrayListener, WidgetsBindingObserver {late StreamSubscription<SignedOutEvent> _signedOutEvent;late StreamSubscription<SignedInEvent> _signedInEvent;Locale? locale;@@ -56,6 +58,7 @@ class _AppState extends State<App> with WindowListener, TrayListener {void initState() {initWindowManager();initTrayManager();+ WidgetsBinding.instance.addObserver(this);_signedOutEvent = Bus.instance.on<SignedOutEvent>().listen((event) {if (mounted) {@@ -98,6 +101,16 @@ class _AppState extends State<App> with WindowListener, TrayListener {_signedInEvent.cancel();}+ @override+ Future<void> didChangeAppLifecycleState(AppLifecycleState state) async {+ debugPrint("AppLifecycleState: $state");+ if (state == AppLifecycleState.resumed) {+ if (Configuration.instance.hasConfiguredAccount()) {+ AuthenticatorService.instance.onlineSync().ignore();+ }+ }+ }+@overrideWidget build(BuildContext context) {if (Platform.isAndroid || kDebugMode) {