mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Secure backup tweaks (#2277)
* Use a custom SDK build that might fix incomplete recovery state false positives. Enable chat backup by default * Get rid of the chat backup feature flag * Fix force unwrap warning * Fix long line warning * Prevent the recovery key confirmation banner popping up before the verification state is fetched. Stop showing secure backup user avatar and menu badges while the session is not verified. * Switch back to the release version of the SDK * Fix inconsistent session verification states, improve/simplify how to deal with it * Fix unit tests * Cleanup and hopefully simplify home screen banner presentations
This commit is contained in:
@@ -191,9 +191,9 @@ struct HomeScreen: View {
|
||||
@ViewBuilder
|
||||
/// The session verification banner and invites button if either are needed.
|
||||
private var topSection: some View {
|
||||
if context.viewState.needsSessionVerification {
|
||||
if context.viewState.showSessionVerificationBanner {
|
||||
HomeScreenSessionVerificationBanner(context: context)
|
||||
} else if context.viewState.needsRecoveryKeyConfirmation {
|
||||
} else if context.viewState.showRecoveryKeyConfirmationBanner {
|
||||
HomeScreenRecoveryKeyConfirmationBanner(context: context)
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ struct HomeScreenUserMenuButton: View {
|
||||
Label {
|
||||
Text(L10n.commonSettings)
|
||||
} icon: {
|
||||
if context.viewState.showSettingsMenuOptionBadge {
|
||||
if context.viewState.requiresSecureBackupSetup, context.viewState.isSessionVerified == true {
|
||||
CompoundIcon(asset: Asset.Images.settingsIconWithBadge)
|
||||
} else {
|
||||
CompoundIcon(\.settings)
|
||||
@@ -50,7 +50,7 @@ struct HomeScreenUserMenuButton: View {
|
||||
avatarSize: .user(on: .home),
|
||||
imageProvider: context.imageProvider)
|
||||
.accessibilityIdentifier(A11yIdentifiers.homeScreen.userAvatar)
|
||||
.overlayBadge(10, isBadged: context.viewState.showUserMenuBadge)
|
||||
.overlayBadge(10, isBadged: context.viewState.requiresSecureBackupSetup && context.viewState.isSessionVerified == true)
|
||||
.compositingGroup()
|
||||
}
|
||||
.accessibilityLabel(L10n.a11yUserMenu)
|
||||
|
||||
Reference in New Issue
Block a user