Fix a bug where the security banner has the wrong state when out of sync. (#3511)

This commit is contained in:
Doug
2024-11-18 11:38:20 +00:00
committed by GitHub
parent c91a9bd9c9
commit bef1eda533
5 changed files with 168 additions and 31 deletions
@@ -120,7 +120,7 @@ struct HomeScreenContent: View {
private var topSection: some View {
// An empty VStack causes glitches within the room list
if context.viewState.shouldShowFilters ||
context.viewState.securityBannerMode == .show ||
context.viewState.securityBannerMode.isShown ||
context.viewState.slidingSyncMigrationBannerMode == .show {
VStack(spacing: 0) {
if context.viewState.shouldShowFilters {
@@ -129,8 +129,8 @@ struct HomeScreenContent: View {
if context.viewState.slidingSyncMigrationBannerMode == .show {
HomeScreenSlidingSyncMigrationBanner(context: context)
} else if context.viewState.securityBannerMode == .show {
HomeScreenRecoveryKeyConfirmationBanner(requiresExtraAccountSetup: context.viewState.requiresExtraAccountSetup, context: context)
} else if case let .show(state) = context.viewState.securityBannerMode {
HomeScreenRecoveryKeyConfirmationBanner(state: state, context: context)
}
}
.background(Color.compound.bgCanvasDefault)