mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
chore: do not remote sync twice in backup page (#22484)
do not remote sync twice in backup page Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
75b9bd163e
commit
44284b4351
4 changed files with 42 additions and 10 deletions
|
|
@ -65,7 +65,9 @@ class BackupToggleButtonState extends ConsumerState<BackupToggleButton> with Sin
|
|||
|
||||
final uploadTasks = ref.watch(driftBackupProvider.select((state) => state.uploadItems));
|
||||
|
||||
final isUploading = uploadTasks.isNotEmpty;
|
||||
final isSyncing = ref.watch(driftBackupProvider.select((state) => state.isSyncing));
|
||||
|
||||
final isProcessing = uploadTasks.isNotEmpty || isSyncing;
|
||||
|
||||
return AnimatedBuilder(
|
||||
animation: _animationController,
|
||||
|
|
@ -129,7 +131,7 @@ class BackupToggleButtonState extends ConsumerState<BackupToggleButton> with Sin
|
|||
],
|
||||
),
|
||||
),
|
||||
child: isUploading
|
||||
child: isProcessing
|
||||
? const SizedBox(width: 24, height: 24, child: CircularProgressIndicator(strokeWidth: 2))
|
||||
: Icon(Icons.cloud_upload_outlined, color: context.primaryColor, size: 24),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue