No need to have list of public room here

This commit is contained in:
Benoit Marty 2021-03-08 13:23:34 +01:00
parent 79c9c7105e
commit 07d2d29212
2 changed files with 2 additions and 2 deletions

View file

@ -29,7 +29,7 @@ data class PublicRoomsViewState(
// Store cumul of pagination result
val publicRooms: List<PublicRoom> = emptyList(),
// Current pagination request
val asyncPublicRoomsRequest: Async<List<PublicRoom>> = Uninitialized,
val asyncPublicRoomsRequest: Async<Unit> = Uninitialized,
// True if more result are available server side
val hasMore: Boolean = false,
// Set of joined roomId,

View file

@ -171,7 +171,7 @@ class RoomDirectoryViewModel @AssistedInject constructor(@Assisted initialState:
setState {
copy(
asyncPublicRoomsRequest = Success(data.chunk!!),
asyncPublicRoomsRequest = Success(Unit),
// It's ok to append at the end of the list, so I use publicRooms.size()
publicRooms = publicRooms.appendAt(data.chunk!!, publicRooms.size)
// Rageshake #8206 tells that we can have several times the same room