diff --git a/mobile/lib/services/favorites_service.dart b/mobile/lib/services/favorites_service.dart index 5388a6e67..6163aa614 100644 --- a/mobile/lib/services/favorites_service.dart +++ b/mobile/lib/services/favorites_service.dart @@ -15,6 +15,7 @@ import 'package:photos/services/collections_service.dart'; import 'package:photos/services/remote_sync_service.dart'; import 'package:photos/ui/actions/collection/collection_sharing_actions.dart'; import 'package:photos/utils/crypto_util.dart'; +import "package:photos/utils/home_widget_util.dart"; class FavoritesService { late Configuration _config; @@ -51,6 +52,7 @@ class FavoritesService { } }); await _warmUpCache(); + await _checkHomeWidget(); } void dispose() { @@ -66,6 +68,12 @@ class FavoritesService { } } + Future _checkHomeWidget() async { + if (await countHomeWidgets() > 0 && hasFavorites()) { + await initHomeWidget(); + } + } + bool hasFavorites() { return _cachedFavUploadedIDs.isNotEmpty; }