mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 09:12:57 +02:00
Fix backup not resuming after closed and reopen (#266)
* Fixed app not resuming backup after closing and reopening the app * Fixed cosmetic effect of backup button doesn't change state right away after pressing start backup * Fixed grammar * Fixed deep copy problem that cause incorrect asset count when backing up * Format code
This commit is contained in:
parent
d02b97e1c1
commit
40a8115101
63 changed files with 677 additions and 300 deletions
mobile/lib/modules/backup/views
|
@ -26,7 +26,7 @@ class BackupControllerPage extends HookConsumerWidget {
|
|||
|
||||
useEffect(() {
|
||||
if (backupState.backupProgress != BackUpProgressEnum.inProgress) {
|
||||
ref.read(backupProvider.notifier).getBackupInfo();
|
||||
ref.watch(backupProvider.notifier).getBackupInfo();
|
||||
}
|
||||
|
||||
ref
|
||||
|
@ -112,13 +112,15 @@ class BackupControllerPage extends HookConsumerWidget {
|
|||
),
|
||||
),
|
||||
onPressed: () {
|
||||
isAutoBackup
|
||||
? ref
|
||||
.watch(authenticationProvider.notifier)
|
||||
.setAutoBackup(false)
|
||||
: ref
|
||||
.watch(authenticationProvider.notifier)
|
||||
.setAutoBackup(true);
|
||||
if (isAutoBackup) {
|
||||
ref
|
||||
.read(authenticationProvider.notifier)
|
||||
.setAutoBackup(false);
|
||||
} else {
|
||||
ref
|
||||
.read(authenticationProvider.notifier)
|
||||
.setAutoBackup(true);
|
||||
}
|
||||
},
|
||||
child: Text("Turn $backupBtnText Backup",
|
||||
style: const TextStyle(fontWeight: FontWeight.bold)),
|
||||
|
@ -212,7 +214,7 @@ class BackupControllerPage extends HookConsumerWidget {
|
|||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text(
|
||||
"Albums to be backup",
|
||||
"Albums to be backed up",
|
||||
style: TextStyle(color: Color(0xFF808080), fontSize: 12),
|
||||
),
|
||||
_buildSelectedAlbumName(),
|
||||
|
@ -282,14 +284,12 @@ class BackupControllerPage extends HookConsumerWidget {
|
|||
),
|
||||
BackupInfoCard(
|
||||
title: "Backup",
|
||||
subtitle:
|
||||
"Photos and videos from selected albums that are backup",
|
||||
subtitle: "Backed up photos and videos",
|
||||
info: "${backupState.selectedAlbumsBackupAssetsIds.length}",
|
||||
),
|
||||
BackupInfoCard(
|
||||
title: "Remainder",
|
||||
subtitle:
|
||||
"Photos and videos that has not been backing up from selected albums",
|
||||
subtitle: "Remaining photos and albums to back up from selection",
|
||||
info:
|
||||
"${backupState.allUniqueAssets.length - backupState.selectedAlbumsBackupAssetsIds.length}",
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue