Do not use a key for the LazyColumn, or the scroll will not behave as expected if a room is moved to the top of the list.
This commit is contained in:
parent
8abb929cb3
commit
6d6500771b
1 changed files with 2 additions and 1 deletions
|
|
@ -259,10 +259,11 @@ private fun RoomListContent(
|
||||||
}
|
}
|
||||||
|
|
||||||
val roomList = state.roomList.dataOrNull().orEmpty()
|
val roomList = state.roomList.dataOrNull().orEmpty()
|
||||||
|
// Note: do not use a key for the LazyColumn, or the scroll will not behave as expected if a room
|
||||||
|
// is moved to the top of the list.
|
||||||
itemsIndexed(
|
itemsIndexed(
|
||||||
items = roomList,
|
items = roomList,
|
||||||
contentType = { _, room -> room.contentType() },
|
contentType = { _, room -> room.contentType() },
|
||||||
key = { _, room -> room.roomId.value }
|
|
||||||
) { index, room ->
|
) { index, room ->
|
||||||
RoomSummaryRow(
|
RoomSummaryRow(
|
||||||
room = room,
|
room = room,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue