mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat: show remainder assets info (#21114)
* feat: show remainder assets info * pr feedback
This commit is contained in:
parent
66c657ca8a
commit
ab2849781a
11 changed files with 195 additions and 45 deletions
|
|
@ -8,6 +8,10 @@ import 'package:flutter/widgets.dart';
|
|||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
|
||||
import 'package:immich_mobile/constants/constants.dart';
|
||||
import 'package:immich_mobile/domain/models/album/local_album.model.dart';
|
||||
import 'package:immich_mobile/domain/models/asset/base_asset.model.dart';
|
||||
import 'package:immich_mobile/infrastructure/repositories/backup.repository.dart';
|
||||
import 'package:immich_mobile/providers/user.provider.dart';
|
||||
import 'package:immich_mobile/services/upload.service.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
|
||||
|
|
@ -356,3 +360,19 @@ class DriftBackupNotifier extends StateNotifier<DriftBackupState> {
|
|||
super.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
final driftBackupCandidateProvider = FutureProvider.autoDispose<List<LocalAsset>>((ref) async {
|
||||
final user = ref.watch(currentUserProvider);
|
||||
if (user == null) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return ref.read(backupRepositoryProvider).getCandidates(user.id);
|
||||
});
|
||||
|
||||
final driftCandidateBackupAlbumInfoProvider = FutureProvider.autoDispose.family<List<LocalAlbum>, String>((
|
||||
ref,
|
||||
assetId,
|
||||
) {
|
||||
return ref.read(backupRepositoryProvider).getSourceAlbums(assetId);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue