mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-02 00:17:41 +01:00
Remove size line from backup info.
This commit is contained in:
committed by
Cody Henthorne
parent
01836b3a7c
commit
206f6d84e7
@@ -16,7 +16,6 @@ import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.update
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.signal.core.models.AccountEntropyPool
|
||||
import org.signal.core.util.bytes
|
||||
import org.signal.core.util.logging.Log
|
||||
import org.thoughtcrime.securesms.R
|
||||
import org.thoughtcrime.securesms.backup.v2.local.ArchiveFileSystem
|
||||
@@ -63,12 +62,10 @@ class RestoreLocalBackupViewModel : ViewModel() {
|
||||
DateUtils.formatDateWithYear(Locale.getDefault(), snapshot.timestamp)
|
||||
}
|
||||
val timeLabel = DateUtils.getOnlyTimeString(context, snapshot.timestamp)
|
||||
val sizeBytes = SnapshotFileSystem(context, snapshot.file).mainLength() ?: 0L
|
||||
|
||||
SelectableBackup(
|
||||
timestamp = snapshot.timestamp,
|
||||
backupTime = "$dateLabel • $timeLabel",
|
||||
backupSize = sizeBytes.bytes.toUnitString()
|
||||
backupTime = "$dateLabel • $timeLabel"
|
||||
)
|
||||
}
|
||||
.toPersistentList()
|
||||
|
||||
@@ -118,11 +118,6 @@ fun YourBackupCard(
|
||||
icon = ImageVector.vectorResource(R.drawable.symbol_recent_24),
|
||||
text = selectedBackup.backupTime
|
||||
)
|
||||
|
||||
BackupInfoRow(
|
||||
icon = ImageVector.vectorResource(R.drawable.symbol_file_24),
|
||||
text = selectedBackup.backupSize
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,8 +146,7 @@ fun SelectLocalBackupScreenPreview() {
|
||||
SelectLocalBackupScreen(
|
||||
selectedBackup = SelectableBackup(
|
||||
timestamp = 0L,
|
||||
backupTime = "Today \u2022 12:34 PM",
|
||||
backupSize = "1.38 GB"
|
||||
backupTime = "Today \u2022 12:34 PM"
|
||||
),
|
||||
isSelectedBackupLatest = true,
|
||||
onRestoreBackupClick = {},
|
||||
|
||||
@@ -76,7 +76,6 @@ fun SelectLocalBackupSheetContent(
|
||||
|
||||
Rows.RadioRow(
|
||||
text = backup.backupTime,
|
||||
label = backup.backupSize,
|
||||
selected = selection == backup,
|
||||
modifier = Modifier
|
||||
.horizontalGutters()
|
||||
@@ -110,19 +109,16 @@ private fun SelectLocalBackupSheetContentPreview() {
|
||||
SelectLocalBackupSheetContent(
|
||||
selectedBackup = SelectableBackup(
|
||||
timestamp = 0L,
|
||||
backupTime = "Today \u2022 3:38am",
|
||||
backupSize = "1.38 GB"
|
||||
backupTime = "Today \u2022 3:38am"
|
||||
),
|
||||
selectableBackups = persistentListOf(
|
||||
SelectableBackup(
|
||||
timestamp = 0L,
|
||||
backupTime = "Today \u2022 3:38am",
|
||||
backupSize = "1.38 GB"
|
||||
backupTime = "Today \u2022 3:38am"
|
||||
),
|
||||
SelectableBackup(
|
||||
timestamp = 1L,
|
||||
backupTime = "August 13, 2024 \u2022 3:21am",
|
||||
backupSize = "1.34 GB"
|
||||
backupTime = "August 13, 2024 \u2022 3:21am"
|
||||
)
|
||||
),
|
||||
onBackupSelected = {}
|
||||
|
||||
@@ -7,6 +7,5 @@ package org.thoughtcrime.securesms.registration.ui.restore.local
|
||||
|
||||
data class SelectableBackup(
|
||||
val timestamp: Long,
|
||||
val backupTime: String,
|
||||
val backupSize: String
|
||||
val backupTime: String
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user