Attempt backing up a subset of messages if you hit the limit.

This commit is contained in:
Greyson Parrelli
2025-11-11 14:48:09 -05:00
committed by GitHub
parent f4e82e6aab
commit b047f8bc0a
11 changed files with 112 additions and 24 deletions

View File

@@ -543,6 +543,7 @@ private fun RemoteBackupsSettingsContent(
item {
BackupCreateErrorRow(
error = state.backupCreationError,
lastMessageCutoffTime = state.lastMessageCutoffTime,
onLearnMoreClick = contentCallbacks::onLearnMoreAboutBackupFailure
)
}
@@ -891,6 +892,7 @@ private fun LazyListScope.appendBackupDetailsItems(
item {
BackupCreateErrorRow(
error = state.backupCreationError,
lastMessageCutoffTime = state.lastMessageCutoffTime,
onLearnMoreClick = contentCallbacks::onLearnMoreAboutBackupFailure
)
}

View File

@@ -32,6 +32,7 @@ data class RemoteBackupsSettingsState(
val canBackupMessagesJobRun: Boolean = false,
val backupMediaDetails: BackupMediaDetails? = null,
val backupCreationError: BackupValues.BackupCreationError? = null,
val lastMessageCutoffTime: Long = 0,
val freeTierMediaRetentionDays: Int = -1,
val isGooglePlayServicesAvailable: Boolean = false
) {

View File

@@ -77,7 +77,8 @@ class RemoteBackupsSettingsViewModel : ViewModel() {
canBackUpUsingCellular = SignalStore.backup.backupWithCellular,
canRestoreUsingCellular = SignalStore.backup.restoreWithCellular,
includeDebuglog = SignalStore.internal.includeDebuglogInBackup.takeIf { RemoteConfig.internalUser },
backupCreationError = SignalStore.backup.backupCreationError
backupCreationError = SignalStore.backup.backupCreationError,
lastMessageCutoffTime = SignalStore.backup.lastUsedMessageCutoffTime
)
)
@@ -348,7 +349,8 @@ class RemoteBackupsSettingsViewModel : ViewModel() {
canRestoreUsingCellular = SignalStore.backup.restoreWithCellular,
isOutOfStorageSpace = BackupRepository.shouldDisplayOutOfRemoteStorageSpaceUx(),
hasRedemptionError = lastPurchase?.data?.error?.data_ == "409",
backupCreationError = SignalStore.backup.backupCreationError
backupCreationError = SignalStore.backup.backupCreationError,
lastMessageCutoffTime = SignalStore.backup.lastUsedMessageCutoffTime
)
}
}