mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 04:58:45 +00:00
Fix application crash when failing to download backup types.
This commit is contained in:
@@ -85,10 +85,15 @@ class MessageBackupsFlowViewModel(
|
||||
}
|
||||
|
||||
viewModelScope.launch {
|
||||
val availableBackupTypes = withContext(SignalDispatchers.IO) {
|
||||
BackupRepository.getAvailableBackupsTypes(
|
||||
if (!RemoteConfig.messageBackups) emptyList() else listOf(MessageBackupTier.FREE, MessageBackupTier.PAID)
|
||||
)
|
||||
val availableBackupTypes = try {
|
||||
withContext(SignalDispatchers.IO) {
|
||||
BackupRepository.getAvailableBackupsTypes(
|
||||
if (!RemoteConfig.messageBackups) emptyList() else listOf(MessageBackupTier.FREE, MessageBackupTier.PAID)
|
||||
)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "Failed to download available backup types.", e)
|
||||
emptyList()
|
||||
}
|
||||
|
||||
internalStateFlow.update {
|
||||
|
||||
Reference in New Issue
Block a user