mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04:00
chore(mobile): clear the backup detail view when no backup is in progress (#17619)
Clear the backup detail view when no backup is in progress * When no backup is in progress, display a simple "-" for the details in the upload file info, instead of the data of the last uploaded asset. * This prevents confusion if a upload job is stuck or just finished.
This commit is contained in:
parent
3eb316abea
commit
7c422363fb
@ -19,6 +19,15 @@ class BackupAssetInfoTable extends ConsumerWidget {
|
||||
),
|
||||
);
|
||||
|
||||
final isUploadInProgress = ref.watch(
|
||||
backupProvider.select(
|
||||
(value) =>
|
||||
value.backupProgress == BackUpProgressEnum.inProgress ||
|
||||
value.backupProgress == BackUpProgressEnum.inBackground ||
|
||||
value.backupProgress == BackUpProgressEnum.manualInProgress,
|
||||
),
|
||||
);
|
||||
|
||||
final asset = isManualUpload
|
||||
? ref.watch(
|
||||
manualUploadProvider.select((value) => value.currentUploadAsset),
|
||||
@ -47,7 +56,9 @@ class BackupAssetInfoTable extends ConsumerWidget {
|
||||
fontSize: 10.0,
|
||||
),
|
||||
).tr(
|
||||
args: [asset.fileName, asset.fileType.toLowerCase()],
|
||||
args: isUploadInProgress
|
||||
? [asset.fileName, asset.fileType.toLowerCase()]
|
||||
: ["-", "-"],
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -67,7 +78,9 @@ class BackupAssetInfoTable extends ConsumerWidget {
|
||||
fontSize: 10.0,
|
||||
),
|
||||
).tr(
|
||||
args: [_getAssetCreationDate(asset)],
|
||||
args: [
|
||||
isUploadInProgress ? _getAssetCreationDate(asset) : "-",
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -85,7 +98,11 @@ class BackupAssetInfoTable extends ConsumerWidget {
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 10.0,
|
||||
),
|
||||
).tr(args: [asset.id]),
|
||||
).tr(
|
||||
args: [
|
||||
isUploadInProgress ? asset.id : "-",
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user