π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Fix changelog showing on fresh install
laurenspriem3002e3b4f5a7
diff --git a/mobile/apps/photos/lib/services/update_service.dart b/mobile/apps/photos/lib/services/update_service.dartindex 12c6eb4647..72d94b1d8f 100644--- a/mobile/apps/photos/lib/services/update_service.dart+++ b/mobile/apps/photos/lib/services/update_service.dart@@ -37,7 +37,13 @@ class UpdateService {Future<bool> shouldShowChangeLog() async {// fetch the change log version which was last shown to user.- final lastShownAtVersion = _prefs.getInt(changeLogVersionKey) ?? 0;+ final lastShownAtVersion = _prefs.getInt(changeLogVersionKey);+ if (lastShownAtVersion == null) {+ // Fresh install: the key was never set, so the user has no previous+ // version to show a "What's New" for. Silently mark as seen.+ await hideChangeLog();+ return false;+ }return lastShownAtVersion < currentChangeLogVersion;}diff --git a/mobile/apps/photos/lib/ui/tabs/home_widget.dart b/mobile/apps/photos/lib/ui/tabs/home_widget.dartindex 14cfe82835..bd15d0b443 100644--- a/mobile/apps/photos/lib/ui/tabs/home_widget.dart+++ b/mobile/apps/photos/lib/ui/tabs/home_widget.dart@@ -1124,11 +1124,11 @@ class _HomeWidgetState extends State<HomeWidget> {);},);+ // Do not show change dialog again+ await updateService.hideChangeLog();} finally {_isShowingChangeLog = false;}- // Do not show change dialog again- updateService.hideChangeLog().ignore();}void _onDidReceiveNotificationResponse(