Add a feature flag for spaces. (#4429)

* Remove the huge conditional compilation block on AppSettings.

It is still required for the ElementCallBaseURL however.

* Add a feature flag for spaces.
This commit is contained in:
Doug
2025-08-22 13:47:23 +01:00
committed by GitHub
parent 487fd90bdb
commit 4bd846118a
15 changed files with 147 additions and 80 deletions
@@ -106,7 +106,10 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
notificationManager: notificationManager,
stateMachineFactory: stateMachineFactory)
chatsTabDetails = .init(tag: HomeTab.chats, title: L10n.screenHomeTabChats, icon: \.chat, selectedIcon: \.chatSolid)
chatsTabDetails.barVisibility = .hidden
if !appSettings.spacesEnabled {
chatsTabDetails.barVisibility = .hidden
}
let spacesSplitCoordinator = NavigationSplitCoordinator(placeholderCoordinator: PlaceholderScreenCoordinator())
spaceExplorerFlowCoordinator = SpaceExplorerFlowCoordinator(userSession: userSession,
@@ -266,6 +269,11 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
}
}
.store(in: &cancellables)
appSettings.$spacesEnabled
.map { $0 ? .automatic : .hidden }
.weakAssign(to: \.chatsTabDetails.barVisibility, on: self)
.store(in: &cancellables)
}
// MARK: - Onboarding