Skip to content

Commit 893ac39

Browse files
authored
Merge pull request #524 from andhiratobing/main
Set item keys for smart recomposition of topics
2 parents cfbf782 + 8eac9a4 commit 893ac39

File tree

1 file changed

+4
-1
lines changed
  • feature/foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou

1 file changed

+4
-1
lines changed

feature/foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,10 @@ private fun TopicSelection(
303303
.fillMaxWidth()
304304
.testTag(topicSelectionTestTag)
305305
) {
306-
items(onboardingUiState.topics) {
306+
items(
307+
items = onboardingUiState.topics,
308+
key = { it.topic.id }
309+
) {
307310
SingleTopicButton(
308311
name = it.topic.name,
309312
topicId = it.topic.id,

0 commit comments

Comments
 (0)