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:
Stefan Ceriu
2026-09-10 17:22:53 +03:00
parent 942535e4fa
commit af202f3466
3 changed files with 10 additions and 10 deletions
@@ -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) }