Skip to content

Commit

Permalink
Consistent tags & named parameter usage
Browse files Browse the repository at this point in the history
  • Loading branch information
keyboardsurfer committed Jul 18, 2022
1 parent 26bdcc9 commit d9bf5b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,11 @@ fun AuthorsCarousel(
modifier: Modifier = Modifier
) {
val lazyListState = rememberLazyListState()
TrackScrollJank(lazyListState, "ForYou:AuthorsCarousel")
val tag = "forYou:authors"
TrackScrollJank(scrollableState = lazyListState, stateName = tag)

LazyRow(
modifier = modifier.testTag("forYou:authors"),
modifier = modifier.testTag(tag),
contentPadding = PaddingValues(24.dp),
horizontalArrangement = Arrangement.spacedBy(24.dp),
state = lazyListState
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,15 @@ fun ForYouScreen(
}
}

val tag = "forYou:feed"

val lazyListState = rememberLazyListState()
TrackScrollJank(lazyListState, "ForYou:Feed")
TrackScrollJank(scrollableState= lazyListState, stateName = tag)

LazyColumn(
modifier = Modifier
.fillMaxSize()
.testTag("forYou:feed"),
.testTag(tag),
state = lazyListState,
) {
InterestsSelection(
Expand Down Expand Up @@ -324,7 +326,7 @@ private fun TopicSelection(
modifier: Modifier = Modifier
) = trace("TopicSelection") {
val lazyGridState = rememberLazyGridState()
TrackScrollJank(scrollableState = lazyGridState, stateName = "ForYou:TopicSelection")
TrackScrollJank(scrollableState = lazyGridState, stateName = "forYou:TopicSelection")

LazyHorizontalGrid(
state = lazyGridState,
Expand Down

0 comments on commit d9bf5b9

Please sign in to comment.