Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Handle restored offline state without key

Neeraj Gupta75bdc127f2ae
diff --git a/mobile/apps/auth/changes/offline-restore-without-key.md b/mobile/apps/auth/changes/offline-restore-without-key.md
new file mode 100644
index 0000000000..54a4552a2a
--- /dev/null
+++ b/mobile/apps/auth/changes/offline-restore-without-key.md
@@ -0,0 +1 @@
+- Fixed startup after restoring offline app data without its device encryption key.
diff --git a/mobile/apps/auth/lib/app/view/app.dart b/mobile/apps/auth/lib/app/view/app.dart
index bf823b0dcb..48d063c281 100644
--- a/mobile/apps/auth/lib/app/view/app.dart
+++ b/mobile/apps/auth/lib/app/view/app.dart
@@ -145,7 +145,8 @@ class _AppState extends State<App> with WidgetsBindingObserver {
return {
"/": (context) =>
Configuration.instance.hasConfiguredAccount() ||
- Configuration.instance.hasOptedForOfflineMode()
+ (Configuration.instance.hasOptedForOfflineMode() &&
+ Configuration.instance.getOfflineSecretKey() != null)
? const HomePage()
: const OnboardingPage(),
};