Do not use key to ensure that the list scroll if a room appears at the top

This commit is contained in:
Benoit Marty 2022-11-23 17:33:06 +01:00
parent 2e05b52167
commit e29e0a99db

View file

@ -125,7 +125,6 @@ fun RoomListContent(
items(
items = roomSummaries,
contentType = { room -> room.contentType() },
key = { room -> room.key() },
) { room ->
RoomSummaryRow(room = room, onClick = ::onRoomClicked)
}
@ -138,7 +137,6 @@ fun RoomListContent(
}
}
private fun RoomListRoomSummary.key() = id
private fun RoomListRoomSummary.contentType() = isPlaceholder
private fun LazyListState.isScrolled(): Boolean {