mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Switch entirely to dynamic room list entries (normalizedMatchRoomName brings the same behavior as the old implementation) and cleanup
This commit is contained in:
committed by
Stefan Ceriu
parent
8dca82e65e
commit
269fd3d1f6
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user