diff --git a/ElementX/Sources/Application/Settings/AppSettings.swift b/ElementX/Sources/Application/Settings/AppSettings.swift index fc6e06e03..addf461e2 100644 --- a/ElementX/Sources/Application/Settings/AppSettings.swift +++ b/ElementX/Sources/Application/Settings/AppSettings.swift @@ -71,7 +71,6 @@ final class AppSettings { case liveLocationDisclaimerDisplayed // Feature flags - case publicSearchEnabled case fuzzyRoomListSearchEnabled case lowPriorityFilterEnabled case enableOnlySignedDeviceIsolationMode @@ -418,9 +417,6 @@ final class AppSettings { // MARK: - Feature Flags /// Others - @UserPreference(key: UserDefaultsKeys.publicSearchEnabled, defaultValue: false, storageType: .userDefaults(store)) - var publicSearchEnabled - @UserPreference(key: UserDefaultsKeys.fuzzyRoomListSearchEnabled, defaultValue: false, storageType: .userDefaults(store)) var fuzzyRoomListSearchEnabled diff --git a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift index f15689a2b..7d5693f29 100644 --- a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift +++ b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift @@ -62,7 +62,6 @@ protocol DeveloperOptionsProtocol: AnyObject { var roomListActivityVisibility: RoomListActivityVisibility { get set } var elementCallBaseURLOverride: URL? { get set } - var publicSearchEnabled: Bool { get set } var fuzzyRoomListSearchEnabled: Bool { get set } var lowPriorityFilterEnabled: Bool { get set } var knockingEnabled: Bool { get set } diff --git a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift index 1a39d797e..d952d69ab 100644 --- a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift +++ b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift @@ -54,10 +54,6 @@ struct DeveloperOptionsScreen: View { } Section("Room List") { - Toggle(isOn: $context.publicSearchEnabled) { - Text("Public search") - } - Picker("Room list activity visibility", selection: $context.roomListActivityVisibility) { ForEach(RoomListActivityVisibility.allCases, id: \.self) { visibility in Text(visibility.rawValue.capitalized) diff --git a/ElementX/Sources/Screens/StartChatScreen/StartChatScreenModels.swift b/ElementX/Sources/Screens/StartChatScreen/StartChatScreenModels.swift index a640484c4..93529d916 100644 --- a/ElementX/Sources/Screens/StartChatScreen/StartChatScreenModels.swift +++ b/ElementX/Sources/Screens/StartChatScreen/StartChatScreenModels.swift @@ -24,7 +24,6 @@ struct StartChatScreenViewState: BindableState { let userID: String var bindings = StartChatScreenViewStateBindings() var usersSection: UserDiscoverySection = .init(type: .suggestions, users: []) - var isRoomDirectoryEnabled = false var isSearching: Bool { !bindings.searchQuery.isEmpty diff --git a/ElementX/Sources/Screens/StartChatScreen/StartChatScreenViewModel.swift b/ElementX/Sources/Screens/StartChatScreen/StartChatScreenViewModel.swift index ba94862aa..63dc76426 100644 --- a/ElementX/Sources/Screens/StartChatScreen/StartChatScreenViewModel.swift +++ b/ElementX/Sources/Screens/StartChatScreen/StartChatScreenViewModel.swift @@ -97,10 +97,6 @@ class StartChatScreenViewModel: StartChatScreenViewModelType, StartChatScreenVie private var internalRoomAddressState: JoinByAddressState = .example private func setupBindings() { - appSettings.$publicSearchEnabled - .weakAssign(to: \.state.isRoomDirectoryEnabled, on: self) - .store(in: &cancellables) - context.$viewState .map(\.bindings.searchQuery) .debounceTextQueriesAndRemoveDuplicates() diff --git a/ElementX/Sources/Screens/StartChatScreen/View/StartChatScreen.swift b/ElementX/Sources/Screens/StartChatScreen/View/StartChatScreen.swift index 3b61b65af..7f5492b3f 100644 --- a/ElementX/Sources/Screens/StartChatScreen/View/StartChatScreen.swift +++ b/ElementX/Sources/Screens/StartChatScreen/View/StartChatScreen.swift @@ -51,9 +51,7 @@ struct StartChatScreen: View { @ViewBuilder private var mainContent: some View { createRoomSection - if context.viewState.isRoomDirectoryEnabled { - roomDirectorySearch - } + roomDirectorySearch inviteFriendsSection joinRoomByAddressSection usersSection @@ -157,7 +155,6 @@ struct StartChatScreen: View { struct StartChatScreen_Previews: PreviewProvider, TestablePreview { static let viewModel = { let appSettings = AppSettings() - appSettings.publicSearchEnabled = true let userSession = UserSessionMock(.init(clientProxy: ClientProxyMock(.init(userID: "@userid:example.com")))) let userDiscoveryService = UserDiscoveryServiceMock() userDiscoveryService.searchProfilesWithReturnValue = .success([.mockAlice])