mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-28 01:49:23 +01: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(
|
copy(
|
||||||
asyncPublicRoomsRequest = Success(data.chunk!!),
|
asyncPublicRoomsRequest = Success(data.chunk!!),
|
||||||
// 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
|
||||||
|
.distinctBy { it.roomId },
|
||||||
hasMore = since != null
|
hasMore = since != null
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user