diff --git a/mobile/lib/modules/search/providers/recently_added.provider.dart b/mobile/lib/modules/search/providers/recently_added.provider.dart index 5b7380979a..4e6d2c1562 100644 --- a/mobile/lib/modules/search/providers/recently_added.provider.dart +++ b/mobile/lib/modules/search/providers/recently_added.provider.dart @@ -1,13 +1,18 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/shared/models/asset.dart'; import 'package:immich_mobile/shared/providers/db.provider.dart'; +import 'package:immich_mobile/shared/providers/user.provider.dart'; import 'package:isar/isar.dart'; final recentlyAddedProvider = FutureProvider>((ref) async { + final user = ref.read(currentUserProvider); + if (user == null) return []; + return ref .watch(dbProvider) .assets .where() + .ownerIdEqualToAnyChecksum(user.isarId) .sortByFileCreatedAtDesc() .findAll(); });