mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Add a joined only option to the room list search filter
The search filter now takes a joinedOnly flag, which appends the SDK's joined filter so that invited and knocked rooms are excluded. It defaults to false, leaving the existing callers unchanged.
This commit is contained in:
@@ -43,8 +43,8 @@ extension RoomSummaryProviderMock {
|
||||
|
||||
setFilterClosure = { [initialRooms, roomListSubject] filter in
|
||||
switch filter {
|
||||
case let .search(query):
|
||||
var rooms = initialRooms
|
||||
case let .search(query, joinedOnly):
|
||||
var rooms = joinedOnly ? initialRooms.filter { $0.joinRequestType == nil } : initialRooms
|
||||
|
||||
if !query.isEmpty {
|
||||
rooms = rooms.filter { $0.name.localizedCaseInsensitiveContains(query) }
|
||||
|
||||
Reference in New Issue
Block a user