mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +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:
@@ -72,10 +72,29 @@ struct HomeScreenViewState: BindableState {
|
||||
let userID: String
|
||||
var userDisplayName: String?
|
||||
var userAvatarURL: URL?
|
||||
var needsSessionVerification = false
|
||||
|
||||
var isSessionVerified: Bool?
|
||||
var hasSessionVerificationBannerBeenDismissed = false
|
||||
var showSessionVerificationBanner: Bool {
|
||||
guard let isSessionVerified else {
|
||||
return false
|
||||
}
|
||||
|
||||
return !isSessionVerified && !hasSessionVerificationBannerBeenDismissed
|
||||
}
|
||||
|
||||
var requiresSecureBackupSetup = false
|
||||
|
||||
var needsRecoveryKeyConfirmation = false
|
||||
var showUserMenuBadge = false
|
||||
var showSettingsMenuOptionBadge = false
|
||||
var hasRecoveryKeyConfirmationBannerBeenDismissed = false
|
||||
var showRecoveryKeyConfirmationBanner: Bool {
|
||||
guard let isSessionVerified else {
|
||||
return false
|
||||
}
|
||||
|
||||
return isSessionVerified && needsRecoveryKeyConfirmation && !hasRecoveryKeyConfirmationBannerBeenDismissed
|
||||
}
|
||||
|
||||
var rooms: [HomeScreenRoom] = []
|
||||
var roomListMode: HomeScreenRoomListMode = .skeletons
|
||||
|
||||
|
||||
Reference in New Issue
Block a user