mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Enable fuzzy search behind a feature flag. (#1490)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user