Revert "Adopt fuzzy searching through the RoomListService's dynamic filter" because of performance issues

This reverts commit e13e97400b.
This commit is contained in:
Stefan Ceriu
2023-08-13 19:38:42 +03:00
parent e13e97400b
commit c9d12122bf
7 changed files with 17 additions and 28 deletions
@@ -47,7 +47,6 @@ enum HomeScreenViewAction {
case skipSessionVerification
case updateVisibleItemRange(range: Range<Int>, isScrolling: Bool)
case selectInvites
case updatedSearchQuery
}
enum HomeScreenRoomListMode: CustomStringConvertible {
@@ -85,7 +84,11 @@ struct HomeScreenViewState: BindableState {
return placeholderRooms
}
return rooms
if bindings.searchQuery.isEmpty {
return rooms
}
return rooms.filter { $0.name.localizedStandardContains(bindings.searchQuery) }
}
var bindings = HomeScreenViewStateBindings()