mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(mobile): handle backup iCloud asset (#5508)
* feat(mobile): handle backup iCloud asset * additional state * Download progress * Added a separate page for backup options * handle ingore iCloud asset upload' * fix init backup service * PR feedback * fix negative count * get file title
This commit is contained in:
parent
c25556bb08
commit
2e59b07cc6
14 changed files with 730 additions and 503 deletions
|
|
@ -61,7 +61,9 @@ class BackupNotifier extends StateNotifier<BackUpState> {
|
|||
fileCreatedAt: DateTime.parse('2020-10-04'),
|
||||
fileName: '...',
|
||||
fileType: '...',
|
||||
iCloudAsset: false,
|
||||
),
|
||||
iCloudDownloadProgress: 0.0,
|
||||
),
|
||||
);
|
||||
|
||||
|
|
@ -444,9 +446,18 @@ class BackupNotifier extends StateNotifier<BackUpState> {
|
|||
|
||||
// Perform Backup
|
||||
state = state.copyWith(cancelToken: CancellationToken());
|
||||
|
||||
final pmProgressHandler = PMProgressHandler();
|
||||
|
||||
pmProgressHandler.stream.listen((event) {
|
||||
final double progress = event.progress;
|
||||
state = state.copyWith(iCloudDownloadProgress: progress);
|
||||
});
|
||||
|
||||
await _backupService.backupAsset(
|
||||
assetsWillBeBackup,
|
||||
state.cancelToken,
|
||||
pmProgressHandler,
|
||||
_onAssetUploaded,
|
||||
_onUploadProgress,
|
||||
_onSetCurrentBackupAsset,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue