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 // Store cumul of pagination result
val publicRooms: List<PublicRoom> = emptyList(), val publicRooms: List<PublicRoom> = emptyList(),
// Current pagination request // Current pagination request
val asyncPublicRoomsRequest: Async<List<PublicRoom>> = Uninitialized, val asyncPublicRoomsRequest: Async<Unit> = Uninitialized,
// True if more result are available server side // True if more result are available server side
val hasMore: Boolean = false, val hasMore: Boolean = false,
// Set of joined roomId, // Set of joined roomId,

View File

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