From 8164c88437ebfbe9458dd4eaf622f0ae00bfb2b3 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Wed, 17 Dec 2025 15:04:02 +0200 Subject: [PATCH] Update history visible settings (#4861) * Fixes #4852 - Update history visible settings * Address PR comments and move attributed strings to the view state --- .../en-US.lproj/Localizable.strings | 7 +- .../en.lproj/Localizable.strings | 7 +- .../Application/Settings/AppSettings.swift | 5 ++ ElementX/Sources/Generated/Strings.swift | 10 ++- .../SecurityAndPrivacyScreenModels.swift | 84 ++++++++++++------- .../SecurityAndPrivacyScreenViewModel.swift | 15 ++-- .../View/SecurityAndPrivacyScreen.swift | 23 ++--- .../UITests/UITestsAppCoordinator.swift | 1 + Enterprise | 2 +- ...vacyScreen.Ask-to-join-room-iPad-en-GB.png | 4 +- ...acyScreen.Ask-to-join-room-iPad-pseudo.png | 4 +- ...cyScreen.Ask-to-join-room-iPhone-en-GB.png | 4 +- ...een.Multiple-Spaces-members-iPad-en-GB.png | 4 +- ...en.Multiple-Spaces-members-iPad-pseudo.png | 4 +- ...n.Multiple-Spaces-members-iPhone-en-GB.png | 4 +- ....Multiple-Spaces-members-iPhone-pseudo.png | 4 +- ...en.Private-invite-only-room-iPad-en-GB.png | 4 +- ...n.Private-invite-only-room-iPad-pseudo.png | 4 +- ....Private-invite-only-room-iPhone-en-GB.png | 4 +- ...Private-invite-only-room-iPhone-pseudo.png | 4 +- ...ndPrivacyScreen.Public-room-iPad-en-GB.png | 4 +- ...dPrivacyScreen.Public-room-iPad-pseudo.png | 4 +- ...PrivacyScreen.Public-room-iPhone-en-GB.png | 4 +- ...Public-room-without-address-iPad-en-GB.png | 4 +- ...ublic-room-without-address-iPad-pseudo.png | 4 +- ...blic-room-without-address-iPhone-en-GB.png | 4 +- ...lic-room-without-address-iPhone-pseudo.png | 4 +- ...PrivacyScreen.Space-members-iPad-en-GB.png | 4 +- ...rivacyScreen.Space-members-iPad-pseudo.png | 4 +- ...ivacyScreen.Space-members-iPhone-en-GB.png | 4 +- ...vacyScreen.Space-members-iPhone-pseudo.png | 4 +- ...henticationStartScreenViewModelTests.swift | 1 + ...curityAndPrivacyScreenViewModelTests.swift | 18 ++-- ...rverConfirmationScreenViewModelTests.swift | 1 + 34 files changed, 150 insertions(+), 112 deletions(-) diff --git a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings index b4b6a527f..f039be755 100644 --- a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings @@ -702,9 +702,11 @@ "screen_security_and_privacy_room_directory_visibility_section_footer" = "Allow for this room to be found by searching %1$@ public room directory"; "screen_security_and_privacy_room_directory_visibility_toggle_description" = "Allow to be found by searching the public directory."; "screen_security_and_privacy_room_directory_visibility_toggle_title" = "Visible in public directory"; +"screen_security_and_privacy_room_history_anyone_option_title" = "Anyone (history is public)"; +"screen_security_and_privacy_room_history_section_footer" = "Changes won't affect past messages, only new ones. %@"; "screen_security_and_privacy_room_history_section_header" = "Who can read history"; -"screen_security_and_privacy_room_history_since_invite_option_title" = "Members only since they were invited"; -"screen_security_and_privacy_room_history_since_selecting_option_title" = "Members only since selecting this option"; +"screen_security_and_privacy_room_history_since_invite_option_title" = "Members since invited"; +"screen_security_and_privacy_room_history_since_selecting_option_title" = "Members (full history)"; "screen_security_and_privacy_room_publishing_section_footer" = "Room addresses are ways to find and access rooms. This also ensures you can easily share your room with others.\nYou can choose to publish your room in your homeserver public room directory."; "screen_security_and_privacy_room_publishing_section_header" = "Room publishing"; "screen_security_and_privacy_room_visibility_section_footer" = "Addresses are a way to find and access rooms and spaces. This also ensures you can easily share them with others."; @@ -1411,7 +1413,6 @@ "screen_security_and_privacy_room_access_anyone_option_title" = "Anyone"; "screen_security_and_privacy_room_access_footer_manage_spaces_action" = "Manage spaces"; "screen_security_and_privacy_room_address_section_footer" = "You’ll need an address in order to make it visible in the public directory."; -"screen_security_and_privacy_room_history_anyone_option_title" = "Anyone"; "screen_space_settings_leave_space" = "Leave space"; "screen_space_settings_roles_and_permissions" = "Roles & permissions"; "screen_space_settings_security_and_privacy" = "Security & privacy"; diff --git a/ElementX/Resources/Localizations/en.lproj/Localizable.strings b/ElementX/Resources/Localizations/en.lproj/Localizable.strings index 9634bfc10..409554b65 100644 --- a/ElementX/Resources/Localizations/en.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en.lproj/Localizable.strings @@ -702,9 +702,11 @@ "screen_security_and_privacy_room_directory_visibility_section_footer" = "Allow for this room to be found by searching %1$@ public room directory"; "screen_security_and_privacy_room_directory_visibility_toggle_description" = "Allow to be found by searching the public directory."; "screen_security_and_privacy_room_directory_visibility_toggle_title" = "Visible in public directory"; +"screen_security_and_privacy_room_history_anyone_option_title" = "Anyone (history is public)"; +"screen_security_and_privacy_room_history_section_footer" = "Changes won't affect past messages, only new ones. %@"; "screen_security_and_privacy_room_history_section_header" = "Who can read history"; -"screen_security_and_privacy_room_history_since_invite_option_title" = "Members only since they were invited"; -"screen_security_and_privacy_room_history_since_selecting_option_title" = "Members only since selecting this option"; +"screen_security_and_privacy_room_history_since_invite_option_title" = "Members since invited"; +"screen_security_and_privacy_room_history_since_selecting_option_title" = "Members (full history)"; "screen_security_and_privacy_room_publishing_section_footer" = "Room addresses are ways to find and access rooms. This also ensures you can easily share your room with others.\nYou can choose to publish your room in your homeserver public room directory."; "screen_security_and_privacy_room_publishing_section_header" = "Room publishing"; "screen_security_and_privacy_room_visibility_section_footer" = "Addresses are a way to find and access rooms and spaces. This also ensures you can easily share them with others."; @@ -1411,7 +1413,6 @@ "screen_security_and_privacy_room_access_anyone_option_title" = "Anyone"; "screen_security_and_privacy_room_access_footer_manage_spaces_action" = "Manage spaces"; "screen_security_and_privacy_room_address_section_footer" = "You’ll need an address in order to make it visible in the public directory."; -"screen_security_and_privacy_room_history_anyone_option_title" = "Anyone"; "screen_space_settings_leave_space" = "Leave space"; "screen_space_settings_roles_and_permissions" = "Roles & permissions"; "screen_space_settings_security_and_privacy" = "Security & privacy"; diff --git a/ElementX/Sources/Application/Settings/AppSettings.swift b/ElementX/Sources/Application/Settings/AppSettings.swift index 51288d59b..96cd6a158 100644 --- a/ElementX/Sources/Application/Settings/AppSettings.swift +++ b/ElementX/Sources/Application/Settings/AppSettings.swift @@ -125,6 +125,7 @@ final class AppSettings { deviceVerificationURL: URL, chatBackupDetailsURL: URL, identityPinningViolationDetailsURL: URL, + historySharingDetailsURL: URL, elementWebHosts: [String], accountProvisioningHost: String, bugReportApplicationID: String, @@ -144,6 +145,7 @@ final class AppSettings { self.deviceVerificationURL = deviceVerificationURL self.chatBackupDetailsURL = chatBackupDetailsURL self.identityPinningViolationDetailsURL = identityPinningViolationDetailsURL + self.historySharingDetailsURL = historySharingDetailsURL self.elementWebHosts = elementWebHosts self.accountProvisioningHost = accountProvisioningHost self.bugReportApplicationID = bugReportApplicationID @@ -202,6 +204,9 @@ final class AppSettings { private(set) var chatBackupDetailsURL: URL = "https://element.io/help#encryption5" /// A URL where users can go read more about identity pinning violations private(set) var identityPinningViolationDetailsURL: URL = "https://element.io/help#encryption18" + /// A URL describing how history sharing works + private(set) var historySharingDetailsURL: URL = "https://element.io/en/help#e2ee-history-sharing" + /// Any domains that Element web may be hosted on - used for handling links. private(set) var elementWebHosts = ["app.element.io", "staging.element.io", "develop.element.io"] /// The domain that account provisioning links will be hosted on - used for handling the links. diff --git a/ElementX/Sources/Generated/Strings.swift b/ElementX/Sources/Generated/Strings.swift index faa17f36a..1384c5d04 100644 --- a/ElementX/Sources/Generated/Strings.swift +++ b/ElementX/Sources/Generated/Strings.swift @@ -2906,13 +2906,17 @@ internal enum L10n { internal static var screenSecurityAndPrivacyRoomDirectoryVisibilityToggleDescription: String { return L10n.tr("Localizable", "screen_security_and_privacy_room_directory_visibility_toggle_description") } /// Visible in public directory internal static var screenSecurityAndPrivacyRoomDirectoryVisibilityToggleTitle: String { return L10n.tr("Localizable", "screen_security_and_privacy_room_directory_visibility_toggle_title") } - /// Anyone + /// Anyone (history is public) internal static var screenSecurityAndPrivacyRoomHistoryAnyoneOptionTitle: String { return L10n.tr("Localizable", "screen_security_and_privacy_room_history_anyone_option_title") } + /// Changes won't affect past messages, only new ones. %@ + internal static func screenSecurityAndPrivacyRoomHistorySectionFooter(_ p1: Any) -> String { + return L10n.tr("Localizable", "screen_security_and_privacy_room_history_section_footer", String(describing: p1)) + } /// Who can read history internal static var screenSecurityAndPrivacyRoomHistorySectionHeader: String { return L10n.tr("Localizable", "screen_security_and_privacy_room_history_section_header") } - /// Members only since they were invited + /// Members since invited internal static var screenSecurityAndPrivacyRoomHistorySinceInviteOptionTitle: String { return L10n.tr("Localizable", "screen_security_and_privacy_room_history_since_invite_option_title") } - /// Members only since selecting this option + /// Members (full history) internal static var screenSecurityAndPrivacyRoomHistorySinceSelectingOptionTitle: String { return L10n.tr("Localizable", "screen_security_and_privacy_room_history_since_selecting_option_title") } /// Room addresses are ways to find and access rooms. This also ensures you can easily share your room with others. /// You can choose to publish your room in your homeserver public room directory. diff --git a/ElementX/Sources/Screens/SecurityAndPrivacyScreen/SecurityAndPrivacyScreenModels.swift b/ElementX/Sources/Screens/SecurityAndPrivacyScreen/SecurityAndPrivacyScreenModels.swift index c2f1154fc..df3ada8ca 100644 --- a/ElementX/Sources/Screens/SecurityAndPrivacyScreen/SecurityAndPrivacyScreenModels.swift +++ b/ElementX/Sources/Screens/SecurityAndPrivacyScreen/SecurityAndPrivacyScreenModels.swift @@ -15,20 +15,12 @@ enum SecurityAndPrivacyScreenViewModelAction { } struct SecurityAndPrivacyScreenViewState: BindableState { - private static let accessSectionFooterAttributedString = { - let linkPlaceholder = "{link}" - var footer = AttributedString(L10n.screenSecurityAndPrivacyRoomAccessFooter(linkPlaceholder)) - var linkString = AttributedString(L10n.screenSecurityAndPrivacyRoomAccessFooterManageSpacesAction) - // Doesn't really matter - linkString.link = .init(stringLiteral: "action://manageSpace") - linkString.bold() - footer.replace(linkPlaceholder, with: linkString) - return footer - }() - let serverName: String + var currentSettings: SecurityAndPrivacySettings var bindings: SecurityAndPrivacyScreenViewStateBindings + let strings: SecurityAndPrivacyScreenStrings + var canonicalAlias: String? var isKnockingEnabled: Bool var isSpaceSettingsEnabled: Bool @@ -38,6 +30,7 @@ struct SecurityAndPrivacyScreenViewState: BindableState { var canEditJoinRule = false var canEnableEncryption = false var canEditHistoryVisibility = false + /// The union of joined parent spaces and the joined spaces in the current access type var selectableJoinedSpaces: [SpaceRoomProxyProtocol] = [] @@ -58,13 +51,13 @@ struct SecurityAndPrivacyScreenViewState: BindableState { } var availableVisibilityOptions: [SecurityAndPrivacyHistoryVisibility] { - var options = [SecurityAndPrivacyHistoryVisibility.sinceSelection] + var options = [SecurityAndPrivacyHistoryVisibility.shared] if !bindings.desiredSettings.isEncryptionEnabled, bindings.desiredSettings.accessType == .anyone { - options.append(.anyone) + options.append(.worldReadable) } else { - options.append(.sinceInvite) + options.append(.invited) } - return options + return options.sorted() } var isSpaceMembersOptionAvailable: Bool { @@ -113,16 +106,14 @@ struct SecurityAndPrivacyScreenViewState: BindableState { } } - var accessSectionFooter: AttributedString? { - if (bindings.desiredSettings.accessType.isSpaceMembers && - isSpaceMembersOptionSelectable) || - (bindings.desiredSettings.accessType.isAskToJoinWithSpaceMembers && - isAskToJoinWithSpaceMembersOptionSelectable), + var shouldShowAccessSectionFooter: Bool { + if (bindings.desiredSettings.accessType.isSpaceMembers && isSpaceMembersOptionSelectable) || + (bindings.desiredSettings.accessType.isAskToJoinWithSpaceMembers && isAskToJoinWithSpaceMembersOptionSelectable), case .multiple = spaceSelection { - Self.accessSectionFooterAttributedString - } else { - nil + return true } + + return false } enum SpaceSelection { @@ -169,7 +160,8 @@ struct SecurityAndPrivacyScreenViewState: BindableState { historyVisibility: SecurityAndPrivacyHistoryVisibility, isSpace: Bool, isKnockingEnabled: Bool, - isSpaceSettingsEnabled: Bool) { + isSpaceSettingsEnabled: Bool, + historySharingDetailsURL: URL) { self.serverName = serverName self.isKnockingEnabled = isKnockingEnabled self.isSpace = isSpace @@ -180,6 +172,7 @@ struct SecurityAndPrivacyScreenViewState: BindableState { historyVisibility: historyVisibility) currentSettings = settings bindings = SecurityAndPrivacyScreenViewStateBindings(desiredSettings: settings) + strings = SecurityAndPrivacyScreenStrings(historySharingDetailsURL: historySharingDetailsURL) } } @@ -254,17 +247,44 @@ enum SecurityAndPrivacyScreenViewAction { case manageSpaces } -enum SecurityAndPrivacyHistoryVisibility { - case sinceSelection - case sinceInvite - case anyone +enum SecurityAndPrivacyHistoryVisibility: Int, Comparable { + case invited + case shared + case worldReadable var fallbackOption: Self { switch self { - case .sinceInvite, .sinceSelection: - return .sinceSelection - case .anyone: - return .sinceInvite + case .invited, .shared: + return .shared + case .worldReadable: + return .invited } } + + static func < (lhs: SecurityAndPrivacyHistoryVisibility, rhs: SecurityAndPrivacyHistoryVisibility) -> Bool { + lhs.rawValue < rhs.rawValue + } +} + +struct SecurityAndPrivacyScreenStrings { + let accessSectionFooterString: AttributedString + let historySectionFooterString: AttributedString + + init(historySharingDetailsURL: URL) { + let linkPlaceholder = "{link}" + + var accessFooterString = AttributedString(L10n.screenSecurityAndPrivacyRoomAccessFooter(linkPlaceholder)) + var accessLinkString = AttributedString(L10n.screenSecurityAndPrivacyRoomAccessFooterManageSpacesAction) + accessLinkString.link = .init(stringLiteral: "action://manageSpace") // The link address doesn't matter + accessLinkString.bold() + accessFooterString.replace(linkPlaceholder, with: accessLinkString) + accessSectionFooterString = accessFooterString + + var historyFooterString = AttributedString(L10n.screenSecurityAndPrivacyRoomHistorySectionFooter(linkPlaceholder)) + var historyLinkString = AttributedString(L10n.actionLearnMore) + historyLinkString.link = historySharingDetailsURL + historyLinkString.bold() + historyFooterString.replace(linkPlaceholder, with: historyLinkString) + historySectionFooterString = historyFooterString + } } diff --git a/ElementX/Sources/Screens/SecurityAndPrivacyScreen/SecurityAndPrivacyScreenViewModel.swift b/ElementX/Sources/Screens/SecurityAndPrivacyScreen/SecurityAndPrivacyScreenViewModel.swift index 15fa19f2b..a6bca20fe 100644 --- a/ElementX/Sources/Screens/SecurityAndPrivacyScreen/SecurityAndPrivacyScreenViewModel.swift +++ b/ElementX/Sources/Screens/SecurityAndPrivacyScreen/SecurityAndPrivacyScreenViewModel.swift @@ -38,7 +38,8 @@ class SecurityAndPrivacyScreenViewModel: SecurityAndPrivacyScreenViewModelType, historyVisibility: roomProxy.infoPublisher.value.historyVisibility.toSecurityAndPrivacyHistoryVisibility, isSpace: roomProxy.infoPublisher.value.isSpace, isKnockingEnabled: appSettings.knockingEnabled, - isSpaceSettingsEnabled: appSettings.spaceSettingsEnabled)) + isSpaceSettingsEnabled: appSettings.spaceSettingsEnabled, + historySharingDetailsURL: appSettings.historySharingDetailsURL)) if let powerLevels = roomProxy.infoPublisher.value.powerLevels { setupPermissions(powerLevels: powerLevels) @@ -345,11 +346,11 @@ private extension RoomHistoryVisibility { var toSecurityAndPrivacyHistoryVisibility: SecurityAndPrivacyHistoryVisibility { switch self { case .joined, .invited: - return .sinceInvite + return .invited case .shared, .custom: - return .sinceSelection + return .shared case .worldReadable: - return .anyone + return .worldReadable } } } @@ -357,11 +358,11 @@ private extension RoomHistoryVisibility { private extension SecurityAndPrivacyHistoryVisibility { var toRoomHistoryVisibility: RoomHistoryVisibility { switch self { - case .sinceSelection: + case .shared: return .shared - case .sinceInvite: + case .invited: return .invited - case .anyone: + case .worldReadable: return .worldReadable } } diff --git a/ElementX/Sources/Screens/SecurityAndPrivacyScreen/View/SecurityAndPrivacyScreen.swift b/ElementX/Sources/Screens/SecurityAndPrivacyScreen/View/SecurityAndPrivacyScreen.swift index 39be70f0d..7b2dfe84b 100644 --- a/ElementX/Sources/Screens/SecurityAndPrivacyScreen/View/SecurityAndPrivacyScreen.swift +++ b/ElementX/Sources/Screens/SecurityAndPrivacyScreen/View/SecurityAndPrivacyScreen.swift @@ -80,8 +80,8 @@ struct SecurityAndPrivacyScreen: View { Text(L10n.screenSecurityAndPrivacyRoomAccessSectionHeader) .compoundListSectionHeader() } footer: { - if let footer = context.viewState.accessSectionFooter { - Text(footer) + if context.viewState.shouldShowAccessSectionFooter { + Text(context.viewState.strings.accessSectionFooterString) .compoundListSectionFooter() .environment(\.openURL, OpenURLAction { _ in context.send(viewAction: .manageSpaces) @@ -133,20 +133,23 @@ struct SecurityAndPrivacyScreen: View { Section { ForEach(context.viewState.availableVisibilityOptions, id: \.self) { option in switch option { - case .sinceSelection: - ListRow(label: .plain(title: L10n.screenSecurityAndPrivacyRoomHistorySinceSelectingOptionTitle), - kind: .selection(isSelected: context.desiredSettings.historyVisibility == .sinceSelection) { context.desiredSettings.historyVisibility = .sinceSelection }) - case .anyone: - ListRow(label: .plain(title: L10n.screenSecurityAndPrivacyRoomHistoryAnyoneOptionTitle), - kind: .selection(isSelected: context.desiredSettings.historyVisibility == .anyone) { context.desiredSettings.historyVisibility = .anyone }) - case .sinceInvite: + case .invited: ListRow(label: .plain(title: L10n.screenSecurityAndPrivacyRoomHistorySinceInviteOptionTitle), - kind: .selection(isSelected: context.desiredSettings.historyVisibility == .sinceInvite) { context.desiredSettings.historyVisibility = .sinceInvite }) + kind: .selection(isSelected: context.desiredSettings.historyVisibility == .invited) { context.desiredSettings.historyVisibility = .invited }) + case .shared: + ListRow(label: .plain(title: L10n.screenSecurityAndPrivacyRoomHistorySinceSelectingOptionTitle), + kind: .selection(isSelected: context.desiredSettings.historyVisibility == .shared) { context.desiredSettings.historyVisibility = .shared }) + case .worldReadable: + ListRow(label: .plain(title: L10n.screenSecurityAndPrivacyRoomHistoryAnyoneOptionTitle), + kind: .selection(isSelected: context.desiredSettings.historyVisibility == .worldReadable) { context.desiredSettings.historyVisibility = .worldReadable }) } } } header: { Text(L10n.screenSecurityAndPrivacyRoomHistorySectionHeader) .compoundListSectionHeader() + } footer: { + Text(context.viewState.strings.historySectionFooterString) + .compoundListSectionFooter() } } diff --git a/ElementX/Sources/UITests/UITestsAppCoordinator.swift b/ElementX/Sources/UITests/UITestsAppCoordinator.swift index 216374790..dcd2ac1ea 100644 --- a/ElementX/Sources/UITests/UITestsAppCoordinator.swift +++ b/ElementX/Sources/UITests/UITestsAppCoordinator.swift @@ -140,6 +140,7 @@ class MockScreen: Identifiable { deviceVerificationURL: appSettings.deviceVerificationURL, chatBackupDetailsURL: appSettings.chatBackupDetailsURL, identityPinningViolationDetailsURL: appSettings.identityPinningViolationDetailsURL, + historySharingDetailsURL: appSettings.historySharingDetailsURL, elementWebHosts: appSettings.elementWebHosts, accountProvisioningHost: appSettings.accountProvisioningHost, bugReportApplicationID: appSettings.bugReportApplicationID, diff --git a/Enterprise b/Enterprise index e2c37065c..a6439b534 160000 --- a/Enterprise +++ b/Enterprise @@ -1 +1 @@ -Subproject commit e2c37065c61558b89129f90d71bd772bc30d3b22 +Subproject commit a6439b534c613e1467e7e428ee4a03547c9bd44f diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Ask-to-join-room-iPad-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Ask-to-join-room-iPad-en-GB.png index beb894658..8588c4b59 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Ask-to-join-room-iPad-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Ask-to-join-room-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2b48503263e69f43d77a74d362a7321ad34b8a921d8b55920412a0097d439327 -size 199998 +oid sha256:4a2874e02e5bae080c7f422b1359199f70f208d60735825416419882e8161b80 +size 195179 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Ask-to-join-room-iPad-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Ask-to-join-room-iPad-pseudo.png index 4ad30b122..93d22a9ff 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Ask-to-join-room-iPad-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Ask-to-join-room-iPad-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:04f76939d9f03527eea26ea8f671c772c8f9ec45ee2d1a13b0621ada54fa9805 -size 239279 +oid sha256:c90113d2a9b105c70446f58fa0e766b1cfdb83d4dae9b4c34efbb575b2cc5d3e +size 233537 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Ask-to-join-room-iPhone-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Ask-to-join-room-iPhone-en-GB.png index b24716768..b52663a22 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Ask-to-join-room-iPhone-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Ask-to-join-room-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e27693a7e2e81d74edfca587593d50ea25e6eafbf3af381152ed358bfc9bc56 -size 132843 +oid sha256:f7aa48ef3727c3fcc42a3b85a55417c217e50a4e50546b1fcb5bf92bb76152e3 +size 132863 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Multiple-Spaces-members-iPad-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Multiple-Spaces-members-iPad-en-GB.png index 8acccbf50..a62b88c8c 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Multiple-Spaces-members-iPad-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Multiple-Spaces-members-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b3bcd80b001708d7b146832168487813d1523f421cb30e17c8c540017b72db92 -size 169810 +oid sha256:b0aa0475b725e6098fa24ac761fd3f49911b383c9570c8bb13db4f3377a01d95 +size 173106 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Multiple-Spaces-members-iPad-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Multiple-Spaces-members-iPad-pseudo.png index fe7763bf5..2b62af4a7 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Multiple-Spaces-members-iPad-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Multiple-Spaces-members-iPad-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c4f699861f429677ecbdd74449f9a5316b35446346d67a1f7433ca2cdce3d439 -size 207842 +oid sha256:d1a17202d7e423dd0cf4f3c593f53567fd90f225909a7aa7383eb66f91637926 +size 215712 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Multiple-Spaces-members-iPhone-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Multiple-Spaces-members-iPhone-en-GB.png index d47e2cb91..3b829e77e 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Multiple-Spaces-members-iPhone-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Multiple-Spaces-members-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3973e132104bbca48b78481b1b625d1cbc322d2346792538ec6f7f7abcc5642c -size 116706 +oid sha256:4077cfd59711750fdb1fe0b7db83d0ba40d037ad1f5bb90003f5cf5be256e71c +size 118589 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Multiple-Spaces-members-iPhone-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Multiple-Spaces-members-iPhone-pseudo.png index e77c74444..e5c4fca22 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Multiple-Spaces-members-iPhone-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Multiple-Spaces-members-iPhone-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a9269423611b2bc9bba3a1fc435a78bb759b04d56987532ec98fb6d2eb6e254f -size 171602 +oid sha256:f38216df06296e66f901f091bddd63a4a39543f6b8ba918852ff63c27968b425 +size 175811 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Private-invite-only-room-iPad-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Private-invite-only-room-iPad-en-GB.png index db0a311e0..c77c2a623 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Private-invite-only-room-iPad-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Private-invite-only-room-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:29d02ff5d0e8b72fd0331ae941b1f31dfc7b673d90239d91a7c4084f8c136621 -size 144394 +oid sha256:19ee4c8b01d1b18b962971ae0b1b950279863d12e832b572e2635837ace8f569 +size 148707 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Private-invite-only-room-iPad-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Private-invite-only-room-iPad-pseudo.png index a9d154a1d..93f95f843 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Private-invite-only-room-iPad-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Private-invite-only-room-iPad-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:82799f6f7b4492e9ac35126851a00be1f7419449dbf55a3b1d65366127b71de3 -size 170443 +oid sha256:96cf543a0c2e74f0551ea7fd0ce6e7e8bd99917548fe909140fe437a9e567068 +size 178398 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Private-invite-only-room-iPhone-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Private-invite-only-room-iPhone-en-GB.png index 121512755..48a49cf8b 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Private-invite-only-room-iPhone-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Private-invite-only-room-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e845ee148aa81dcedfe402297b1f02bc43a1d44d996ddc5cbc63a7654ed25d84 -size 92004 +oid sha256:108fa3154405e527b4f83dfb15f2d7720b375c349c8d9de50c4984192839ef26 +size 93016 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Private-invite-only-room-iPhone-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Private-invite-only-room-iPhone-pseudo.png index 6a9b0647b..37267da61 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Private-invite-only-room-iPhone-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Private-invite-only-room-iPhone-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3d4387dfb9c807dd865ceeea3c2385a0443cb507aa2bb168256a55557c871b65 -size 127409 +oid sha256:78b1a757c93851e03f3b3985b0e0b53a132447b307cae179cc2f1004b3ace777 +size 132322 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-iPad-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-iPad-en-GB.png index 4cc95e866..f91c6d3f9 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-iPad-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1bec92ef9a845303d03b1ea1889db19f7a47e98ab8dd054e87b67bd0f1aa3b26 -size 186779 +oid sha256:9af7a48f714bec7db946bdf6762507aca1cd5609eadcb025857f7f3a7bd33179 +size 198158 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-iPad-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-iPad-pseudo.png index f8720b043..cf6dc890b 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-iPad-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-iPad-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:340e36605dc15ae5a8b0277e263308b8ca1d50daf17bf096a6817728a4f21314 -size 230701 +oid sha256:09c27b020aa57d79a2c3f45477488ec16221b9c0527d3e267a1ff97e4e7de201 +size 250631 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-iPhone-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-iPhone-en-GB.png index 8f943a340..2bd5fca53 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-iPhone-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b802c8a6e3d596fcbbe93e06e4d61c710dba500c425208f2a0c135da72eccf9e -size 132822 +oid sha256:5ea2f6d3dfa555f7be8886086f8f9885e8a537599e5e130d8019e870b5018b2a +size 134575 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-without-address-iPad-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-without-address-iPad-en-GB.png index b3efce1d7..2d49451d4 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-without-address-iPad-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-without-address-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1ab333cea8fc694964547481d6f7f81a2a0cde6a36b280136d3f27025432f77c -size 159173 +oid sha256:c324010c3328fa225c4477f1bb27be733072e5d8cd3ce888db6220a6d3bda0e6 +size 170487 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-without-address-iPad-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-without-address-iPad-pseudo.png index ffb1b075f..0e6ddb8d3 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-without-address-iPad-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-without-address-iPad-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2bcebf976c3d773027f92bbd67219ad73c094911006df8bdcc212944e2bf1256 -size 196268 +oid sha256:a9f990d9f6f2f095601efa8c1e4095a35d536144c38bcef9ad6c2aa9f860b8c3 +size 216361 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-without-address-iPhone-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-without-address-iPhone-en-GB.png index 0ab74c16c..5b3cbdef7 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-without-address-iPhone-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-without-address-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0e395a16e80474762ccbb09e690bc87e570adaf0bbf7b45ec66d2c236711f758 -size 107787 +oid sha256:bbc7316079d963ff3b8bc1680ba8bdc8212985668552de2fca39a6c51d004ab0 +size 115669 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-without-address-iPhone-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-without-address-iPhone-pseudo.png index 7e5cd2621..8b0f860c2 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-without-address-iPhone-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Public-room-without-address-iPhone-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1ce54e285e0750c2d0435f14e27ea142e7519a0aa8f7666785ad7c6fd00db6a8 -size 150993 +oid sha256:23fddbb25038c9fdc0bfa53d48e0093cd22f4bc02453d0c4e436a64d531eb388 +size 153794 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Space-members-iPad-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Space-members-iPad-en-GB.png index f3eede2ca..a6bfcaf6e 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Space-members-iPad-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Space-members-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5260ba3c86cd6d45a7c6c8340f535a584e4a6df6633beacaa8fdc5ee2d8e070c -size 156742 +oid sha256:b05a474e324855ae6a103ba650d11789b18ad5aabbf2690d5597302e58f1949b +size 160311 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Space-members-iPad-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Space-members-iPad-pseudo.png index 679ea5216..623ee36e3 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Space-members-iPad-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Space-members-iPad-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8482c728dcab50c5ec8dee6a26e45c9c274c72e2ba38ae5a2f65aa4f99d7d7f0 -size 187240 +oid sha256:ae46bf0c3b975cd3314419e27af5e008f4c33e7682803a917f7b830accfc126c +size 195684 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Space-members-iPhone-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Space-members-iPhone-en-GB.png index 2870fc4ca..640856ed1 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Space-members-iPhone-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Space-members-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:26a31269bb5d89e8575f92305885f876eea5f05cb44b993705519d25bdd6354a -size 103262 +oid sha256:1709e4b6fa0940284e48c4b8725c79361b5618fcdc3e49db8b87ccc5b0d874d9 +size 105070 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Space-members-iPhone-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Space-members-iPhone-pseudo.png index b7c84494d..f19215e21 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Space-members-iPhone-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/securityAndPrivacyScreen.Space-members-iPhone-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:55fd33e5832f09c6cbbb5456ba3a50a878fae58cd87845cc6e2702cb6ad802f0 -size 146541 +oid sha256:9ff5f7930b551928469368cd0ce87fc0819ee63ccd01f8c1f627b21251ae8507 +size 151578 diff --git a/UnitTests/Sources/AuthenticationStartScreenViewModelTests.swift b/UnitTests/Sources/AuthenticationStartScreenViewModelTests.swift index 8a3021e51..1e9e789f1 100644 --- a/UnitTests/Sources/AuthenticationStartScreenViewModelTests.swift +++ b/UnitTests/Sources/AuthenticationStartScreenViewModelTests.swift @@ -172,6 +172,7 @@ class AuthenticationStartScreenViewModelTests: XCTestCase { deviceVerificationURL: appSettings.deviceVerificationURL, chatBackupDetailsURL: appSettings.chatBackupDetailsURL, identityPinningViolationDetailsURL: appSettings.identityPinningViolationDetailsURL, + historySharingDetailsURL: appSettings.historySharingDetailsURL, elementWebHosts: appSettings.elementWebHosts, accountProvisioningHost: appSettings.accountProvisioningHost, bugReportApplicationID: appSettings.bugReportApplicationID, diff --git a/UnitTests/Sources/SecurityAndPrivacyScreenViewModelTests.swift b/UnitTests/Sources/SecurityAndPrivacyScreenViewModelTests.swift index 4efbfde38..f9814dc35 100644 --- a/UnitTests/Sources/SecurityAndPrivacyScreenViewModelTests.swift +++ b/UnitTests/Sources/SecurityAndPrivacyScreenViewModelTests.swift @@ -46,7 +46,7 @@ class SecurityAndPrivacyScreenViewModelTests: XCTestCase { context.send(viewAction: .selectedSpaceMembersAccess) XCTAssertEqual(context.desiredSettings.accessType, .spaceMembers(spaceIDs: [space.id])) - XCTAssertNil(context.viewState.accessSectionFooter) + XCTAssertFalse(context.viewState.shouldShowAccessSectionFooter) XCTAssertFalse(context.viewState.isSaveDisabled) let expectation = expectation(description: "Join rule has updated") @@ -77,7 +77,7 @@ class SecurityAndPrivacyScreenViewModelTests: XCTestCase { context.send(viewAction: .selectedAskToJoinWithSpaceMembersAccess) XCTAssertEqual(context.desiredSettings.accessType, .askToJoinWithSpaceMembers(spaceIDs: [space.id])) - XCTAssertNil(context.viewState.accessSectionFooter) + XCTAssertFalse(context.viewState.shouldShowAccessSectionFooter) XCTAssertFalse(context.viewState.isSaveDisabled) let expectation = expectation(description: "Join rule has updated") @@ -101,7 +101,7 @@ class SecurityAndPrivacyScreenViewModelTests: XCTestCase { XCTAssertEqual(context.viewState.currentSettings.accessType, .spaceMembers(spaceIDs: [space.id])) XCTAssertEqual(context.desiredSettings, context.viewState.currentSettings) XCTAssertTrue(context.viewState.isSpaceMembersOptionSelectable) - XCTAssertNil(context.viewState.accessSectionFooter) + XCTAssertFalse(context.viewState.shouldShowAccessSectionFooter) XCTAssertTrue(context.viewState.isSaveDisabled) guard case .singleUnknown = context.viewState.spaceSelection else { XCTFail("Expected spaceSelection to be .singleUnknown") @@ -152,7 +152,7 @@ class SecurityAndPrivacyScreenViewModelTests: XCTestCase { try await deferredAction.fulfill() selectedIDs.send([spaces[0].id]) XCTAssertEqual(context.desiredSettings.accessType, .spaceMembers(spaceIDs: [spaces[0].id])) - XCTAssertNotNil(context.viewState.accessSectionFooter) + XCTAssertTrue(context.viewState.shouldShowAccessSectionFooter) XCTAssertFalse(context.viewState.isSaveDisabled) let expectation = expectation(description: "Join rule has updated") @@ -196,7 +196,7 @@ class SecurityAndPrivacyScreenViewModelTests: XCTestCase { try await deferredAction.fulfill() selectedIDs.send([spaces[0].id]) XCTAssertEqual(context.desiredSettings.accessType, .askToJoinWithSpaceMembers(spaceIDs: [spaces[0].id])) - XCTAssertNotNil(context.viewState.accessSectionFooter) + XCTAssertTrue(context.viewState.shouldShowAccessSectionFooter) XCTAssertFalse(context.viewState.isSaveDisabled) let expectation = expectation(description: "Join rule has updated") @@ -242,7 +242,7 @@ class SecurityAndPrivacyScreenViewModelTests: XCTestCase { try await deferredAction.fulfill() selectedIDs.send([spaces[0].id, "unknownSpaceID"]) XCTAssertEqual(context.desiredSettings.accessType, .spaceMembers(spaceIDs: [spaces[0].id, "unknownSpaceID"])) - XCTAssertNotNil(context.viewState.accessSectionFooter) + XCTAssertTrue(context.viewState.shouldShowAccessSectionFooter) XCTAssertFalse(context.viewState.isSaveDisabled) let expectation = expectation(description: "Join rule has updated") @@ -293,7 +293,7 @@ class SecurityAndPrivacyScreenViewModelTests: XCTestCase { try await deferredAction.fulfill() selectedIDs.send([allSpaces[0].id, "unknownSpaceID"]) XCTAssertEqual(context.desiredSettings.accessType, .spaceMembers(spaceIDs: [allSpaces[0].id, "unknownSpaceID"])) - XCTAssertNotNil(context.viewState.accessSectionFooter) + XCTAssertTrue(context.viewState.shouldShowAccessSectionFooter) XCTAssertFalse(context.viewState.isSaveDisabled) } @@ -309,7 +309,7 @@ class SecurityAndPrivacyScreenViewModelTests: XCTestCase { XCTAssertTrue(context.viewState.currentSettings.accessType.isSpaceMembers) XCTAssertTrue(context.viewState.isSaveDisabled) XCTAssertFalse(context.viewState.isSpaceMembersOptionSelectable) - XCTAssertNil(context.viewState.accessSectionFooter) + XCTAssertFalse(context.viewState.shouldShowAccessSectionFooter) guard case .empty = context.viewState.spaceSelection else { XCTFail("Expected spaceSelection to be .empty") return @@ -329,7 +329,7 @@ class SecurityAndPrivacyScreenViewModelTests: XCTestCase { XCTAssertTrue(context.viewState.currentSettings.accessType.isSpaceMembers) XCTAssertTrue(context.viewState.isSaveDisabled) XCTAssertTrue(context.viewState.isSpaceMembersOptionSelectable) - XCTAssertNotNil(context.viewState.accessSectionFooter) + XCTAssertTrue(context.viewState.shouldShowAccessSectionFooter) guard case .multiple = context.viewState.spaceSelection else { XCTFail("Expected spaceSelection to be .multiple") return diff --git a/UnitTests/Sources/ServerConfirmationScreenViewModelTests.swift b/UnitTests/Sources/ServerConfirmationScreenViewModelTests.swift index 3ee1bea2a..d610406e8 100644 --- a/UnitTests/Sources/ServerConfirmationScreenViewModelTests.swift +++ b/UnitTests/Sources/ServerConfirmationScreenViewModelTests.swift @@ -324,6 +324,7 @@ class ServerConfirmationScreenViewModelTests: XCTestCase { deviceVerificationURL: appSettings.deviceVerificationURL, chatBackupDetailsURL: appSettings.chatBackupDetailsURL, identityPinningViolationDetailsURL: appSettings.identityPinningViolationDetailsURL, + historySharingDetailsURL: appSettings.historySharingDetailsURL, elementWebHosts: appSettings.elementWebHosts, accountProvisioningHost: appSettings.accountProvisioningHost, bugReportApplicationID: appSettings.bugReportApplicationID,