Enable fuzzy search behind a feature flag. (#1490)

This commit is contained in:
Doug
2023-08-14 17:41:41 +01:00
committed by GitHub
parent b58f76b170
commit b2928a0dc6
11 changed files with 62 additions and 17 deletions
@@ -47,6 +47,7 @@ enum HomeScreenViewAction {
case skipSessionVerification
case updateVisibleItemRange(range: Range<Int>, isScrolling: Bool)
case selectInvites
case updatedSearchQuery
}
enum HomeScreenRoomListMode: CustomStringConvertible {
@@ -79,12 +80,14 @@ struct HomeScreenViewState: BindableState {
var selectedRoomID: String?
var fuzzySearchEnabled: Bool
var visibleRooms: [HomeScreenRoom] {
if roomListMode == .skeletons {
return placeholderRooms
}
if bindings.searchQuery.isEmpty {
if fuzzySearchEnabled || bindings.searchQuery.isEmpty {
return rooms
}