2023-03-25 05:44:53 +02:00
|
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
|
|
import 'package:immich_mobile/shared/models/asset.dart';
|
|
|
|
import 'package:immich_mobile/shared/providers/db.provider.dart';
|
2023-12-28 07:33:37 +02:00
|
|
|
import 'package:isar/isar.dart';
|
2023-03-25 05:44:53 +02:00
|
|
|
|
2024-01-27 18:14:32 +02:00
|
|
|
final recentlyAddedProvider = FutureProvider<List<Asset>>((ref) async {
|
|
|
|
return ref
|
|
|
|
.watch(dbProvider)
|
2023-03-25 05:44:53 +02:00
|
|
|
.assets
|
2023-12-28 07:33:37 +02:00
|
|
|
.where()
|
|
|
|
.sortByFileCreatedAtDesc()
|
|
|
|
.findAll();
|
2023-03-25 05:44:53 +02:00
|
|
|
});
|