Browse Source

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

feature/bma/flipper
Benoit Marty 2 years ago
parent
commit
e29e0a99db
  1. 2
      features/roomlist/src/main/java/io/element/android/x/features/roomlist/RoomListScreen.kt

2
features/roomlist/src/main/java/io/element/android/x/features/roomlist/RoomListScreen.kt

@ -125,7 +125,6 @@ fun RoomListContent( @@ -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( @@ -138,7 +137,6 @@ fun RoomListContent(
}
}
private fun RoomListRoomSummary.key() = id
private fun RoomListRoomSummary.contentType() = isPlaceholder
private fun LazyListState.isScrolled(): Boolean {

Loading…
Cancel
Save