Fix secure backup recovery badges not being show when incomplete

This commit is contained in:
Stefan Ceriu
2023-12-04 09:16:35 +02:00
committed by Stefan Ceriu
parent 290dd852a3
commit 3fe5ec5ffa
3 changed files with 4 additions and 3 deletions
@@ -99,6 +99,7 @@ struct SecureBackupScreen: View {
kind: .navigationLink { context.send(viewAction: .recoveryKey) })
case .incomplete:
ListRow(label: .plain(title: L10n.screenChatBackupRecoveryActionConfirm),
details: .icon(BadgeView(size: 10)),
kind: .navigationLink { context.send(viewAction: .recoveryKey) })
default:
ListRow(label: .plain(title: L10n.commonLoading), details: .isWaiting(true), kind: .label)
@@ -59,7 +59,7 @@ class SettingsScreenViewModel: SettingsScreenViewModelType, SettingsScreenViewMo
.sink { [weak self] state in
guard let self else { return }
self.state.showSecureBackupBadge = (state == .unknown || state == .disabled) && appSettings.chatBackupEnabled
self.state.showSecureBackupBadge = (state == .incomplete || state == .disabled) && appSettings.chatBackupEnabled
}
.store(in: &cancellables)