diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/RoomListSectionBuilderGroup.kt b/vector/src/main/java/im/vector/app/features/home/room/list/RoomListSectionBuilderGroup.kt index e43370c1af..1ca379882c 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/RoomListSectionBuilderGroup.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/RoomListSectionBuilderGroup.kt @@ -86,6 +86,7 @@ class RoomListSectionBuilderGroup( it.activeGroupId = actualGroupId } } + addSection( sections, activeGroupAwareQueries, @@ -111,6 +112,7 @@ class RoomListSectionBuilderGroup( }.also { onDisposable.invoke(it) } + return sections } @@ -257,6 +259,7 @@ class RoomListSectionBuilderGroup( }.also { onDisposable.invoke(it) } + sections.add( RoomsSection( sectionName = name, diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/RoomListSectionBuilderSpace.kt b/vector/src/main/java/im/vector/app/features/home/room/list/RoomListSectionBuilderSpace.kt index 1e1134c284..6edbb07992 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/RoomListSectionBuilderSpace.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/RoomListSectionBuilderSpace.kt @@ -70,12 +70,15 @@ class RoomListSectionBuilderSpace( val activeSpaceAwareQueries = mutableListOf() when (mode) { RoomListDisplayMode.PEOPLE -> { + // 4 sections Invites / Fav / Dms / Low Priority buildDmSections(sections, activeSpaceAwareQueries) } RoomListDisplayMode.ROOMS -> { + // 6 sections invites / Fav / Rooms / Low Priority / Server notice / Suggested rooms buildRoomsSections(sections, activeSpaceAwareQueries) } RoomListDisplayMode.FILTERED -> { + // Used when searching for rooms withQueryParams( { it.memberships = Membership.activeMemberships() @@ -140,7 +143,8 @@ class RoomListSectionBuilderSpace( return sections } - private fun buildRoomsSections(sections: MutableList, activeSpaceAwareQueries: MutableList) { + private fun buildRoomsSections(sections: MutableList, + activeSpaceAwareQueries: MutableList) { if (autoAcceptInvites.showInvites()) { addSection( sections = sections, @@ -259,7 +263,8 @@ class RoomListSectionBuilderSpace( ) } - private fun buildDmSections(sections: MutableList, activeSpaceAwareQueries: MutableList) { + private fun buildDmSections(sections: MutableList, + activeSpaceAwareQueries: MutableList) { if (autoAcceptInvites.showInvites()) { addSection( sections = sections, @@ -321,7 +326,6 @@ class RoomListSectionBuilderSpace( withQueryParams( { query.invoke(it) }, { roomQueryParams -> - val name = stringProvider.getString(nameRes) session.getFilteredPagedRoomSummariesLive( roomQueryParams.process(spaceFilterStrategy, appStateHandler.safeActiveSpaceId()), @@ -364,7 +368,6 @@ class RoomListSectionBuilderSpace( } }.livePagedList .let { livePagedList -> - // use it also as a source to update count livePagedList.asObservable() .observeOn(Schedulers.computation())