Skip to content

High performance self-hosted photo and video management solution.

chore(mobile): clear the backup detail view when no backup is in progress (#17619)

Toni7c422363fbb2
diff --git a/mobile/lib/widgets/backup/asset_info_table.dart b/mobile/lib/widgets/backup/asset_info_table.dart
index bbcbbe375f..222e516cf7 100644
--- a/mobile/lib/widgets/backup/asset_info_table.dart
+++ b/mobile/lib/widgets/backup/asset_info_table.dart
@@ -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 : "-",
+ ],
+ ),
),
),
],