π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fix: move fav init to album service
Prateek Sunal162a2efe71fa
diff --git a/mobile/lib/main.dart b/mobile/lib/main.dartindex bc3e007f98..a9294e45ff 100644--- a/mobile/lib/main.dart+++ b/mobile/lib/main.dart@@ -169,7 +169,6 @@ Future<void> _runMinimally(String taskId, TimeLogger tlog) async {LocalFileUpdateService.instance.init(prefs);await LocalSyncService.instance.init(prefs);RemoteSyncService.instance.init(prefs);- await FavoritesService.instance.initFav();await SyncService.instance.init(prefs);// Misc Servicesdiff --git a/mobile/lib/services/album_home_widget_service.dart b/mobile/lib/services/album_home_widget_service.dartindex 3f05e6ddf1..3e32d93818 100644--- a/mobile/lib/services/album_home_widget_service.dart+++ b/mobile/lib/services/album_home_widget_service.dart@@ -12,6 +12,7 @@ import 'package:photos/models/collection/collection.dart';import 'package:photos/models/collection/collection_items.dart';import 'package:photos/models/file/file.dart';import 'package:photos/service_locator.dart';+import "package:photos/services/app_lifecycle_service.dart";import 'package:photos/services/collections_service.dart';import 'package:photos/services/favorites_service.dart';import 'package:photos/services/home_widget_service.dart';@@ -294,9 +295,13 @@ class AlbumHomeWidgetService {// If no albums selected, use favorites as defaultif (selectedAlbumIds == null || selectedAlbumIds.isEmpty) {+ if (!AppLifecycleService.instance.isForeground) {+ await FavoritesService.instance.initFav();+ }final favoriteId =await FavoritesService.instance.getFavoriteCollectionID();if (favoriteId != null) {+ await updateSelectedAlbums([favoriteId.toString()]);return [favoriteId];}}