refactor(mobile): backup provider (#16360)

* refactor(mobile): backup provider

* refactor(mobile): backup provider
This commit is contained in:
Alex 2025-02-27 09:56:23 -06:00 committed by GitHub
parent 082471dfd9
commit c70c9067b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 109 additions and 81 deletions

View file

@ -1,15 +1,16 @@
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:immich_mobile/entities/backup_album.entity.dart';
import 'package:immich_mobile/interfaces/backup.interface.dart';
import 'package:immich_mobile/interfaces/backup_album.interface.dart';
import 'package:immich_mobile/providers/db.provider.dart';
import 'package:immich_mobile/repositories/database.repository.dart';
import 'package:isar/isar.dart';
final backupRepositoryProvider =
Provider((ref) => BackupRepository(ref.watch(dbProvider)));
final backupAlbumRepositoryProvider =
Provider((ref) => BackupAlbumRepository(ref.watch(dbProvider)));
class BackupRepository extends DatabaseRepository implements IBackupRepository {
BackupRepository(super.db);
class BackupAlbumRepository extends DatabaseRepository
implements IBackupAlbumRepository {
BackupAlbumRepository(super.db);
@override
Future<List<BackupAlbum>> getAll({BackupAlbumSort? sort}) {