mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Fix a crash on public room list
It's maybe a workaround, as it should not happen, but at least it will not crash anymore
This commit is contained in:
parent
79f11ad686
commit
08970ad8c1
@ -178,7 +178,9 @@ class RoomDirectoryViewModel @AssistedInject constructor(@Assisted initialState:
|
||||
copy(
|
||||
asyncPublicRoomsRequest = Success(data.chunk!!),
|
||||
// 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
|
||||
.distinctBy { it.roomId },
|
||||
hasMore = since != null
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user