Show recovery instead of verification if this is the last session and recovery is set up

* Show recovery instead of verification if this is the last session and recovery is set up

* Rename `recoveryKeyState` to `recoveryState`

* Remove duplicates on session security state changes.

* Fix missing "Save recovery key" button

* Fix unit tests

* Rename `isLastDevice` to `isOnlyDeviceLeft`

* Address PR comments
This commit is contained in:
Stefan Ceriu
2024-02-16 11:38:49 +02:00
committed by GitHub
parent e0c9f43026
commit db05540cc5
23 changed files with 255 additions and 208 deletions
@@ -116,10 +116,13 @@ struct HomeScreenContent: View {
filters
}
if context.viewState.showSessionVerificationBanner {
switch context.viewState.securityBannerMode {
case .sessionVerification:
HomeScreenSessionVerificationBanner(context: context)
} else if context.viewState.showRecoveryKeyConfirmationBanner {
case .recoveryKeyConfirmation:
HomeScreenRecoveryKeyConfirmationBanner(context: context)
default:
EmptyView()
}
if context.viewState.hasPendingInvitations, !context.isSearchFieldFocused {