mirror of
https://github.com/immich-app/immich.git
synced 2024-12-19 00:32:49 +02:00
fd3a1a4da8
* fix(mobile): Load assets on "Live-Images" page Instead of requesting the server for the relevant entries, we can use the local DB. This change fixes loading errors when going to the "Live-Images" page. It is similar to the work done with #5971. * fix(mobile): Fix Recently added page
13 lines
398 B
Dart
13 lines
398 B
Dart
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:isar/isar.dart';
|
|
|
|
final recentlyAddedProvider = FutureProvider<List<Asset>>( (ref) async {
|
|
return ref.watch(dbProvider)
|
|
.assets
|
|
.where()
|
|
.sortByFileCreatedAtDesc()
|
|
.findAll();
|
|
});
|