Switch entirely to dynamic room list entries (normalizedMatchRoomName brings the same behavior as the old implementation) and cleanup

This commit is contained in:
Stefan Ceriu
2023-08-22 09:23:53 +03:00
committed by Stefan Ceriu
parent 8dca82e65e
commit 269fd3d1f6
6 changed files with 11 additions and 56 deletions
@@ -79,18 +79,12 @@ struct HomeScreenViewState: BindableState {
var selectedRoomID: String?
var dynamicEntriesEnabled: Bool
var visibleRooms: [HomeScreenRoom] {
if roomListMode == .skeletons {
return placeholderRooms
}
if dynamicEntriesEnabled || bindings.searchQuery.isEmpty {
return rooms
}
return rooms.filter { $0.name.localizedStandardContains(bindings.searchQuery) }
return rooms
}
var bindings = HomeScreenViewStateBindings()