Consistent tags & named parameter usage

pull/145/head
Ben Weiss 2 years ago
parent 26bdcc9a3a
commit 7c2b5840e1
No known key found for this signature in database
GPG Key ID: 8424F9C1E763A74C

@ -68,10 +68,11 @@ fun AuthorsCarousel(
modifier: Modifier = Modifier modifier: Modifier = Modifier
) { ) {
val lazyListState = rememberLazyListState() val lazyListState = rememberLazyListState()
TrackScrollJank(lazyListState, "ForYou:AuthorsCarousel") val tag = "forYou:authors"
TrackScrollJank(scrollableState = lazyListState, stateName = tag)
LazyRow( LazyRow(
modifier = modifier.testTag("forYou:authors"), modifier = modifier.testTag(tag),
contentPadding = PaddingValues(24.dp), contentPadding = PaddingValues(24.dp),
horizontalArrangement = Arrangement.spacedBy(24.dp), horizontalArrangement = Arrangement.spacedBy(24.dp),
state = lazyListState state = lazyListState

@ -191,13 +191,15 @@ fun ForYouScreen(
} }
} }
val tag = "forYou:feed"
val lazyListState = rememberLazyListState() val lazyListState = rememberLazyListState()
TrackScrollJank(lazyListState, "ForYou:Feed") TrackScrollJank(scrollableState = lazyListState, stateName = tag)
LazyColumn( LazyColumn(
modifier = Modifier modifier = Modifier
.fillMaxSize() .fillMaxSize()
.testTag("forYou:feed"), .testTag(tag),
state = lazyListState, state = lazyListState,
) { ) {
InterestsSelection( InterestsSelection(
@ -324,7 +326,7 @@ private fun TopicSelection(
modifier: Modifier = Modifier modifier: Modifier = Modifier
) = trace("TopicSelection") { ) = trace("TopicSelection") {
val lazyGridState = rememberLazyGridState() val lazyGridState = rememberLazyGridState()
TrackScrollJank(scrollableState = lazyGridState, stateName = "ForYou:TopicSelection") TrackScrollJank(scrollableState = lazyGridState, stateName = "forYou:TopicSelection")
LazyHorizontalGrid( LazyHorizontalGrid(
state = lazyGridState, state = lazyGridState,

Loading…
Cancel
Save