mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Remove the RoomDirectorySearch feature flag and enable the feature by default.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user