From 465f832ba5adaca0b3c932180a47ca868acff0b2 Mon Sep 17 00:00:00 2001 From: Mauro Romito Date: Thu, 26 Feb 2026 15:45:07 +0100 Subject: [PATCH] remove space FFs --- .../Navigation/NavigationTabCoordinator.swift | 5 +--- .../Application/Settings/AppSettings.swift | 15 ----------- .../StartChatFlowCoordinator.swift | 2 +- .../UserSessionFlowCoordinator.swift | 8 ------ .../Screens/HomeScreen/HomeScreenModels.swift | 4 +-- .../HomeScreen/HomeScreenViewModel.swift | 6 ----- .../Screens/HomeScreen/View/HomeScreen.swift | 2 +- .../SecurityAndPrivacyScreenModels.swift | 5 +--- .../SecurityAndPrivacyScreenViewModel.swift | 5 ---- .../View/SecurityAndPrivacyScreen.swift | 8 +++--- .../SpaceScreen/SpaceScreenModels.swift | 1 - .../SpaceScreen/SpaceScreenViewModel.swift | 13 +++------- .../Spaces/SpaceScreen/View/SpaceScreen.swift | 26 ++++++------------- .../SpacesScreen/SpacesScreenModels.swift | 4 +-- .../SpacesScreen/SpacesScreenViewModel.swift | 5 ---- .../SpacesScreen/View/SpacesScreen.swift | 19 ++++++-------- .../UITests/UITestsAppCoordinator.swift | 1 - ...curityAndPrivacyScreenViewModelTests.swift | 1 - 18 files changed, 30 insertions(+), 100 deletions(-) diff --git a/ElementX/Sources/Application/Navigation/NavigationTabCoordinator.swift b/ElementX/Sources/Application/Navigation/NavigationTabCoordinator.swift index 361b73a9e..c44a23262 100644 --- a/ElementX/Sources/Application/Navigation/NavigationTabCoordinator.swift +++ b/ElementX/Sources/Application/Navigation/NavigationTabCoordinator.swift @@ -25,7 +25,6 @@ import SwiftUI let icon: KeyPath let selectedIcon: KeyPath var badgeCount = 0 - var barVisibilityOverride: Visibility? /// Provide the tab's split coordinator in here to have the tab bar automatically hidden /// when pushing a child into the split view's details on iPhone/compact iPad. @@ -39,9 +38,7 @@ import SwiftUI } func barVisibility(in horizontalSizeClass: UserInterfaceSizeClass?) -> Visibility { - if let barVisibilityOverride { - barVisibilityOverride - } else if horizontalSizeClass == .compact, navigationSplitCoordinator?.detailCoordinator != nil { + if horizontalSizeClass == .compact, navigationSplitCoordinator?.detailCoordinator != nil { // Whilst we support pushing screens on the stack in the sidebarCoordinator, in practice // we never do that, so simply checking that the detailCoordinator exists is enough. .hidden diff --git a/ElementX/Sources/Application/Settings/AppSettings.swift b/ElementX/Sources/Application/Settings/AppSettings.swift index 2e8fc4fc1..29912639e 100644 --- a/ElementX/Sources/Application/Settings/AppSettings.swift +++ b/ElementX/Sources/Application/Settings/AppSettings.swift @@ -77,11 +77,6 @@ final class AppSettings { case focusEventOnNotificationTap case linkNewDeviceEnabled - // Spaces - case spaceFiltersEnabled - case spaceSettingsEnabled - case createSpaceEnabled - case voiceMessagePlaybackSpeed // Doug's tweaks 🔧 @@ -404,16 +399,6 @@ final class AppSettings { // MARK: - Feature Flags - /// Spaces - @UserPreference(key: UserDefaultsKeys.spaceSettingsEnabled, defaultValue: true, storageType: .volatile) - var spaceSettingsEnabled - - @UserPreference(key: UserDefaultsKeys.createSpaceEnabled, defaultValue: true, storageType: .volatile) - var createSpaceEnabled - - @UserPreference(key: UserDefaultsKeys.spaceFiltersEnabled, defaultValue: true, storageType: .volatile) - var spaceFiltersEnabled - /// Others @UserPreference(key: UserDefaultsKeys.publicSearchEnabled, defaultValue: false, storageType: .userDefaults(store)) var publicSearchEnabled diff --git a/ElementX/Sources/FlowCoordinators/StartChatFlowCoordinator.swift b/ElementX/Sources/FlowCoordinators/StartChatFlowCoordinator.swift index 139aa662d..246d8339f 100644 --- a/ElementX/Sources/FlowCoordinators/StartChatFlowCoordinator.swift +++ b/ElementX/Sources/FlowCoordinators/StartChatFlowCoordinator.swift @@ -150,7 +150,7 @@ class StartChatFlowCoordinator: FlowCoordinatorProtocol { stateMachine.addRoutes(event: .createRoom(isSpace: false), transitions: [.startChat => .createRoom]) { [weak self] context in guard let self, context.fromState == .startChat else { return } // Required check because the event is used in another route. presentCreateRoomScreen(isSpace: false, - spaceSelectionMode: flowParameters.appSettings.createSpaceEnabled ? .editableSpacesList(preSelectedSpace: nil) : .none, + spaceSelectionMode: .editableSpacesList(preSelectedSpace: nil), isRoot: false) } stateMachine.addRoutes(event: .dismissedCreateRoom, transitions: [.createRoom => .startChat]) { [weak self] _ in diff --git a/ElementX/Sources/FlowCoordinators/UserSessionFlowCoordinator.swift b/ElementX/Sources/FlowCoordinators/UserSessionFlowCoordinator.swift index 6195a3226..3d77809f4 100644 --- a/ElementX/Sources/FlowCoordinators/UserSessionFlowCoordinator.swift +++ b/ElementX/Sources/FlowCoordinators/UserSessionFlowCoordinator.swift @@ -288,14 +288,6 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol { } } .store(in: &cancellables) - - userSession.clientProxy.spaceService.topLevelSpacesPublisher - .combineLatest(flowParameters.appSettings.$createSpaceEnabled) - .map { topLevelSpaces, isCreateSpaceEnabled in - !isCreateSpaceEnabled && topLevelSpaces.isEmpty ? .hidden : nil - } - .weakAssign(to: \.chatsTabDetails.barVisibilityOverride, on: self) - .store(in: &cancellables) } // MARK: - Onboarding diff --git a/ElementX/Sources/Screens/HomeScreen/HomeScreenModels.swift b/ElementX/Sources/Screens/HomeScreen/HomeScreenModels.swift index 225b67c37..4999d09bc 100644 --- a/ElementX/Sources/Screens/HomeScreen/HomeScreenModels.swift +++ b/ElementX/Sources/Screens/HomeScreen/HomeScreenModels.swift @@ -109,9 +109,7 @@ struct HomeScreenViewState: BindableState { var hideInviteAvatars = false var reportRoomEnabled = false - - var spaceFiltersEnabled = false - + var shouldShowSpaceFilters = false var selectedSpaceFilter: SpaceServiceFilter? diff --git a/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift b/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift index 00f27fd7c..96d073df0 100644 --- a/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift +++ b/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift @@ -46,7 +46,6 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol roomSummaryProvider = userSession.clientProxy.roomSummaryProvider super.init(initialViewState: .init(userID: userSession.clientProxy.userID, - spaceFiltersEnabled: appSettings.spaceFiltersEnabled, bindings: .init(filtersState: .init(appSettings: appSettings))), mediaProvider: userSession.mediaProvider) @@ -132,11 +131,6 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol } .store(in: &cancellables) - appSettings.$spaceFiltersEnabled - .receive(on: DispatchQueue.main) - .weakAssign(to: \.state.spaceFiltersEnabled, on: self) - .store(in: &cancellables) - userSession.clientProxy.hideInviteAvatarsPublisher .removeDuplicates() .receive(on: DispatchQueue.main) diff --git a/ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift b/ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift index 09352f968..2a52b9504 100644 --- a/ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift +++ b/ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift @@ -66,7 +66,7 @@ struct HomeScreen: View { } } - if context.viewState.spaceFiltersEnabled, context.viewState.shouldShowSpaceFilters { + if context.viewState.shouldShowSpaceFilters { if #available(iOS 26, *) { ToolbarSpacer(.fixed, placement: .primaryAction) } diff --git a/ElementX/Sources/Screens/SecurityAndPrivacyScreen/SecurityAndPrivacyScreenModels.swift b/ElementX/Sources/Screens/SecurityAndPrivacyScreen/SecurityAndPrivacyScreenModels.swift index 1c23321af..2d8aebd56 100644 --- a/ElementX/Sources/Screens/SecurityAndPrivacyScreen/SecurityAndPrivacyScreenModels.swift +++ b/ElementX/Sources/Screens/SecurityAndPrivacyScreen/SecurityAndPrivacyScreenModels.swift @@ -23,7 +23,6 @@ struct SecurityAndPrivacyScreenViewState: BindableState { var canonicalAlias: String? var isKnockingEnabled: Bool - var isSpaceSettingsEnabled: Bool var isSpace: Bool var canEditAddress = false @@ -65,7 +64,7 @@ struct SecurityAndPrivacyScreenViewState: BindableState { } var isSpaceMembersOptionSelectable: Bool { - isSpaceSettingsEnabled && selectableSpacesCount > 0 + selectableSpacesCount > 0 } var isAskToJoinWithSpaceMembersOptionAvailable: Bool { @@ -160,12 +159,10 @@ struct SecurityAndPrivacyScreenViewState: BindableState { historyVisibility: SecurityAndPrivacyHistoryVisibility, isSpace: Bool, isKnockingEnabled: Bool, - isSpaceSettingsEnabled: Bool, historySharingDetailsURL: URL) { self.serverName = serverName self.isKnockingEnabled = isKnockingEnabled self.isSpace = isSpace - self.isSpaceSettingsEnabled = isSpaceSettingsEnabled let settings = SecurityAndPrivacySettings(accessType: accessType, isEncryptionEnabled: isEncryptionEnabled, diff --git a/ElementX/Sources/Screens/SecurityAndPrivacyScreen/SecurityAndPrivacyScreenViewModel.swift b/ElementX/Sources/Screens/SecurityAndPrivacyScreen/SecurityAndPrivacyScreenViewModel.swift index bdf3e6188..02dce5074 100644 --- a/ElementX/Sources/Screens/SecurityAndPrivacyScreen/SecurityAndPrivacyScreenViewModel.swift +++ b/ElementX/Sources/Screens/SecurityAndPrivacyScreen/SecurityAndPrivacyScreenViewModel.swift @@ -38,7 +38,6 @@ class SecurityAndPrivacyScreenViewModel: SecurityAndPrivacyScreenViewModelType, historyVisibility: roomProxy.infoPublisher.value.historyVisibility.toSecurityAndPrivacyHistoryVisibility, isSpace: roomProxy.infoPublisher.value.isSpace, isKnockingEnabled: appSettings.knockingEnabled, - isSpaceSettingsEnabled: appSettings.spaceSettingsEnabled, historySharingDetailsURL: appSettings.historySharingDetailsURL)) if let powerLevels = roomProxy.infoPublisher.value.powerLevels { @@ -153,10 +152,6 @@ class SecurityAndPrivacyScreenViewModel: SecurityAndPrivacyScreenViewModelType, appSettings.$knockingEnabled .weakAssign(to: \.state.isKnockingEnabled, on: self) .store(in: &cancellables) - - appSettings.$spaceSettingsEnabled - .weakAssign(to: \.state.isSpaceSettingsEnabled, on: self) - .store(in: &cancellables) } private func setupPermissions(powerLevels: RoomPowerLevelsProxyProtocol) { diff --git a/ElementX/Sources/Screens/SecurityAndPrivacyScreen/View/SecurityAndPrivacyScreen.swift b/ElementX/Sources/Screens/SecurityAndPrivacyScreen/View/SecurityAndPrivacyScreen.swift index 059ae545c..4a58c2a68 100644 --- a/ElementX/Sources/Screens/SecurityAndPrivacyScreen/View/SecurityAndPrivacyScreen.swift +++ b/ElementX/Sources/Screens/SecurityAndPrivacyScreen/View/SecurityAndPrivacyScreen.swift @@ -263,7 +263,7 @@ struct SecurityAndPrivacyScreen_Previews: PreviewProvider, TestablePreview { static let singleSpaceMembersViewModel = { AppSettings.resetAllSettings() let appSettings = AppSettings() - appSettings.spaceSettingsEnabled = true + let space = [SpaceServiceRoom].mockSingleRoom[0] return SecurityAndPrivacyScreenViewModel(roomProxy: JoinedRoomProxyMock(.init(isEncrypted: false, @@ -280,7 +280,7 @@ struct SecurityAndPrivacyScreen_Previews: PreviewProvider, TestablePreview { static let multipleSpacesMembersViewModel = { AppSettings.resetAllSettings() let appSettings = AppSettings() - appSettings.spaceSettingsEnabled = true + let spaces = [SpaceServiceRoom].mockJoinedSpaces return SecurityAndPrivacyScreenViewModel(roomProxy: JoinedRoomProxyMock(.init(isEncrypted: false, @@ -312,8 +312,8 @@ struct SecurityAndPrivacyScreen_Previews: PreviewProvider, TestablePreview { static let singleAskToJoinSpaceMembersViewModel = { AppSettings.resetAllSettings() let appSettings = AppSettings() - appSettings.spaceSettingsEnabled = true appSettings.knockingEnabled = true + let space = [SpaceServiceRoom].mockSingleRoom[0] return SecurityAndPrivacyScreenViewModel(roomProxy: JoinedRoomProxyMock(.init(isEncrypted: false, @@ -330,8 +330,8 @@ struct SecurityAndPrivacyScreen_Previews: PreviewProvider, TestablePreview { static let multipleAskToJoinSpacesMembersViewModel = { AppSettings.resetAllSettings() let appSettings = AppSettings() - appSettings.spaceSettingsEnabled = true appSettings.knockingEnabled = true + let spaces = [SpaceServiceRoom].mockJoinedSpaces return SecurityAndPrivacyScreenViewModel(roomProxy: JoinedRoomProxyMock(.init(isEncrypted: false, diff --git a/ElementX/Sources/Screens/Spaces/SpaceScreen/SpaceScreenModels.swift b/ElementX/Sources/Screens/Spaces/SpaceScreen/SpaceScreenModels.swift index 5ee985237..b030a716b 100644 --- a/ElementX/Sources/Screens/Spaces/SpaceScreen/SpaceScreenModels.swift +++ b/ElementX/Sources/Screens/Spaces/SpaceScreen/SpaceScreenModels.swift @@ -36,7 +36,6 @@ struct SpaceScreenViewState: BindableState { var canEditRolesAndPermissions = false var canEditSecurityAndPrivacy = false var canEditChildren = false - var canCreateRoom = false var editMode: EditMode = .inactive var editModeSelectedIDs: Set = [] diff --git a/ElementX/Sources/Screens/Spaces/SpaceScreen/SpaceScreenViewModel.swift b/ElementX/Sources/Screens/Spaces/SpaceScreen/SpaceScreenViewModel.swift index ce579003a..b95f864be 100644 --- a/ElementX/Sources/Screens/Spaces/SpaceScreen/SpaceScreenViewModel.swift +++ b/ElementX/Sources/Screens/Spaces/SpaceScreen/SpaceScreenViewModel.swift @@ -75,10 +75,6 @@ class SpaceScreenViewModel: SpaceScreenViewModelType, SpaceScreenViewModelProtoc .weakAssign(to: \.state.selectedSpaceRoomID, on: self) .store(in: &cancellables) - appSettings.$createSpaceEnabled - .weakAssign(to: \.state.canCreateRoom, on: self) - .store(in: &cancellables) - Task { if case let .joined(roomProxy) = await userSession.clientProxy.roomForIdentifier(spaceRoomListProxy.id) { // Required to listen for membership updates in the members flow @@ -88,11 +84,10 @@ class SpaceScreenViewModel: SpaceScreenViewModelType, SpaceScreenViewModelProtoc state.permalink = permalinkURL } - appSettings.$spaceSettingsEnabled - .combineLatest(roomProxy.infoPublisher) - .sink { [weak self] isEnabled, roomInfo in + roomProxy.infoPublisher + .sink { [weak self] roomInfo in guard let self else { return } - guard isEnabled, let powerLevels = roomInfo.powerLevels else { + guard let powerLevels = roomInfo.powerLevels else { state.canEditBaseInfo = false state.canEditRolesAndPermissions = false state.canEditSecurityAndPrivacy = false @@ -247,7 +242,7 @@ class SpaceScreenViewModel: SpaceScreenViewModelType, SpaceScreenViewModelProtoc } let leaveSpaceViewModel = LeaveSpaceViewModel(spaceName: state.space.name, - canEditRolesAndPermissions: appSettings.spaceSettingsEnabled && state.canEditRolesAndPermissions, + canEditRolesAndPermissions: state.canEditRolesAndPermissions, leaveHandle: leaveHandle, userIndicatorController: userIndicatorController, mediaProvider: mediaProvider) diff --git a/ElementX/Sources/Screens/Spaces/SpaceScreen/View/SpaceScreen.swift b/ElementX/Sources/Screens/Spaces/SpaceScreen/View/SpaceScreen.swift index 7547eba31..2429c200f 100644 --- a/ElementX/Sources/Screens/Spaces/SpaceScreen/View/SpaceScreen.swift +++ b/ElementX/Sources/Screens/Spaces/SpaceScreen/View/SpaceScreen.swift @@ -78,12 +78,10 @@ struct SpaceScreen: View { } .buttonStyle(.compound(.primary)) - if context.viewState.canCreateRoom { - Button(L10n.actionCreateRoom) { - context.send(viewAction: .createChildRoom) - } - .buttonStyle(.compound(.secondary)) + Button(L10n.actionCreateRoom) { + context.send(viewAction: .createChildRoom) } + .buttonStyle(.compound(.secondary)) } .padding(.horizontal, 16) } @@ -128,11 +126,9 @@ struct SpaceScreen: View { Menu { if context.viewState.canEditChildren { Section { - if context.viewState.canCreateRoom { - Button { context.send(viewAction: .createChildRoom) } label: { - Label(L10n.actionCreateRoom, icon: \.plus) - } - .accessibilityIdentifier(A11yIdentifiers.spaceScreen.createRoom) + Button { context.send(viewAction: .createChildRoom) } label: { + Label(L10n.actionCreateRoom, icon: \.plus) + .accessibilityIdentifier(A11yIdentifiers.spaceScreen.createRoom) } Button { context.send(viewAction: .addExistingRooms) } label: { @@ -207,16 +203,10 @@ struct SpaceScreen_Previews: PreviewProvider, TestablePreview { SpaceScreen(context: newSpaceViewModel.context) } .previewDisplayName("New Space") - .snapshotPreferences(expect: newSpaceViewModel.context.observe(\.viewState).map { - $0.canCreateRoom && $0.canEditChildren - }) + .snapshotPreferences(expect: newSpaceViewModel.context.observe(\.viewState).map(\.canEditChildren)) } static func makeViewModel(isManagingRooms: Bool = false, isNewSpace: Bool = false) -> SpaceScreenViewModel { - let appSettings = AppSettings() - appSettings.spaceSettingsEnabled = true - appSettings.createSpaceEnabled = true - let spaceServiceRoom = SpaceServiceRoom.mock(id: "!eng-space:matrix.org", name: "Engineering Team", isSpace: true, @@ -239,7 +229,7 @@ struct SpaceScreen_Previews: PreviewProvider, TestablePreview { spaceServiceProxy: SpaceServiceProxyMock(.init()), selectedSpaceRoomPublisher: .init(nil), userSession: userSession, - appSettings: appSettings, + appSettings: AppSettings(), userIndicatorController: UserIndicatorControllerMock()) if isManagingRooms { diff --git a/ElementX/Sources/Screens/Spaces/SpacesScreen/SpacesScreenModels.swift b/ElementX/Sources/Screens/Spaces/SpacesScreen/SpacesScreenModels.swift index 053a33071..4ab3f45a7 100644 --- a/ElementX/Sources/Screens/Spaces/SpacesScreen/SpacesScreenModels.swift +++ b/ElementX/Sources/Screens/Spaces/SpacesScreen/SpacesScreenModels.swift @@ -21,9 +21,7 @@ struct SpacesScreenViewState: BindableState { var topLevelSpaces: [SpaceServiceRoom] var selectedSpaceID: String? - - var isCreateSpaceEnabled: Bool - + var bindings: SpacesScreenViewStateBindings } diff --git a/ElementX/Sources/Screens/Spaces/SpacesScreen/SpacesScreenViewModel.swift b/ElementX/Sources/Screens/Spaces/SpacesScreen/SpacesScreenViewModel.swift index 8b019a92e..68b59b4d6 100644 --- a/ElementX/Sources/Screens/Spaces/SpacesScreen/SpacesScreenViewModel.swift +++ b/ElementX/Sources/Screens/Spaces/SpacesScreen/SpacesScreenViewModel.swift @@ -31,7 +31,6 @@ class SpacesScreenViewModel: SpacesScreenViewModelType, SpacesScreenViewModelPro super.init(initialViewState: SpacesScreenViewState(userID: userSession.clientProxy.userID, topLevelSpaces: spaceServiceProxy.topLevelSpacesPublisher.value, - isCreateSpaceEnabled: appSettings.createSpaceEnabled, bindings: .init()), mediaProvider: userSession.mediaProvider) @@ -53,10 +52,6 @@ class SpacesScreenViewModel: SpacesScreenViewModelType, SpacesScreenViewModelPro .receive(on: DispatchQueue.main) .weakAssign(to: \.state.userDisplayName, on: self) .store(in: &cancellables) - - appSettings.$createSpaceEnabled - .weakAssign(to: \.state.isCreateSpaceEnabled, on: self) - .store(in: &cancellables) } // MARK: - Public diff --git a/ElementX/Sources/Screens/Spaces/SpacesScreen/View/SpacesScreen.swift b/ElementX/Sources/Screens/Spaces/SpacesScreen/View/SpacesScreen.swift index 56e21c73d..6db2229d2 100644 --- a/ElementX/Sources/Screens/Spaces/SpacesScreen/View/SpacesScreen.swift +++ b/ElementX/Sources/Screens/Spaces/SpacesScreen/View/SpacesScreen.swift @@ -27,7 +27,7 @@ struct SpacesScreen: View { @ViewBuilder private var mainContent: some View { - if context.viewState.isCreateSpaceEnabled, context.viewState.topLevelSpaces.isEmpty { + if context.viewState.topLevelSpaces.isEmpty { emptyState } else { ScrollView { @@ -118,16 +118,14 @@ struct SpacesScreen: View { } .backportSharedBackgroundVisibility(.hidden) - if context.viewState.isCreateSpaceEnabled { - ToolbarItem(placement: .navigationBarTrailing) { - Button { - context.send(viewAction: .createSpace) - } label: { - CompoundIcon(\.plus) - .accessibilityHidden(true) - } - .accessibilityLabel(L10n.actionCreateSpace) + ToolbarItem(placement: .navigationBarTrailing) { + Button { + context.send(viewAction: .createSpace) + } label: { + CompoundIcon(\.plus) + .accessibilityHidden(true) } + .accessibilityLabel(L10n.actionCreateSpace) } } } @@ -152,7 +150,6 @@ struct SpacesScreen_Previews: PreviewProvider, TestablePreview { static func makeViewModel(isEmpty: Bool = false) -> SpacesScreenViewModel { AppSettings.resetAllSettings() let appSettings = AppSettings() - appSettings.createSpaceEnabled = true appSettings.hasSeenSpacesAnnouncement = true let clientProxy = ClientProxyMock(.init()) diff --git a/ElementX/Sources/UITests/UITestsAppCoordinator.swift b/ElementX/Sources/UITests/UITestsAppCoordinator.swift index 0c674ae8d..922827853 100644 --- a/ElementX/Sources/UITests/UITestsAppCoordinator.swift +++ b/ElementX/Sources/UITests/UITestsAppCoordinator.swift @@ -588,7 +588,6 @@ class MockScreen: Identifiable { appSettings.hasRunNotificationPermissionsOnboarding = true appSettings.analyticsConsentState = .optedOut appSettings.hasSeenSpacesAnnouncement = true - appSettings.spaceSettingsEnabled = true let roomSummaries: [RoomSummary] = if id == .userSessionSpacesFlow { [[RoomSummary].mockSpaceInvites[0]] + .mockRooms diff --git a/UnitTests/Sources/SecurityAndPrivacyScreenViewModelTests.swift b/UnitTests/Sources/SecurityAndPrivacyScreenViewModelTests.swift index 2b4ad8094..7479f7fa5 100644 --- a/UnitTests/Sources/SecurityAndPrivacyScreenViewModelTests.swift +++ b/UnitTests/Sources/SecurityAndPrivacyScreenViewModelTests.swift @@ -446,7 +446,6 @@ final class SecurityAndPrivacyScreenViewModelTests { topLevelSpaces: [SpaceServiceRoom] = [], joinRule: ElementX.JoinRule) { let appSettings = AppSettings() - appSettings.spaceSettingsEnabled = true appSettings.knockingEnabled = true roomProxy = JoinedRoomProxyMock(.init(isEncrypted: false, canonicalAlias: "#room:matrix.org",