mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Secure backup tweaks (#2122)
* Show the recovery section if key backup is anything **but** disabled * Don't show an action on secure backup if its current state is unknown * Do not show a badge on the home screen avatar while the recovery state is unknown * Do not assume key backup is disabled when its state is unknown. If the state is unknown, check if a backup exists remotely. * Dedupe remote backup state requests and handle task cancellations
This commit is contained in:
+4
-2
@@ -23,7 +23,7 @@ struct SecureBackupScreen: View {
|
||||
|
||||
var body: some View {
|
||||
Form {
|
||||
if context.viewState.keyBackupState != .enabled {
|
||||
if context.viewState.keyBackupState == .disabled {
|
||||
keyBackupSection
|
||||
} else {
|
||||
keyBackupSection
|
||||
@@ -77,10 +77,12 @@ struct SecureBackupScreen: View {
|
||||
ListRow(label: .plain(title: L10n.screenChatBackupKeyBackupActionDisable, role: .destructive), kind: .navigationLink {
|
||||
context.send(viewAction: .keyBackup)
|
||||
})
|
||||
case .disabled, .enabling, .unknown:
|
||||
case .disabled, .enabling:
|
||||
ListRow(label: .plain(title: L10n.screenChatBackupKeyBackupActionEnable), kind: .navigationLink {
|
||||
context.send(viewAction: .keyBackup)
|
||||
})
|
||||
case .unknown:
|
||||
EmptyView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user