From 07d2d2921233f917e9a938b15b776fa1bc1fd2df Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 8 Mar 2021 13:23:34 +0100 Subject: [PATCH] No need to have list of public room here --- .../vector/app/features/roomdirectory/PublicRoomsViewState.kt | 2 +- .../vector/app/features/roomdirectory/RoomDirectoryViewModel.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/roomdirectory/PublicRoomsViewState.kt b/vector/src/main/java/im/vector/app/features/roomdirectory/PublicRoomsViewState.kt index b4cdb2f009..16e5428b9c 100644 --- a/vector/src/main/java/im/vector/app/features/roomdirectory/PublicRoomsViewState.kt +++ b/vector/src/main/java/im/vector/app/features/roomdirectory/PublicRoomsViewState.kt @@ -29,7 +29,7 @@ data class PublicRoomsViewState( // Store cumul of pagination result val publicRooms: List = emptyList(), // Current pagination request - val asyncPublicRoomsRequest: Async> = Uninitialized, + val asyncPublicRoomsRequest: Async = Uninitialized, // True if more result are available server side val hasMore: Boolean = false, // Set of joined roomId, diff --git a/vector/src/main/java/im/vector/app/features/roomdirectory/RoomDirectoryViewModel.kt b/vector/src/main/java/im/vector/app/features/roomdirectory/RoomDirectoryViewModel.kt index f5c545c34d..7a57be773f 100644 --- a/vector/src/main/java/im/vector/app/features/roomdirectory/RoomDirectoryViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/roomdirectory/RoomDirectoryViewModel.kt @@ -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