From 1c09d0a6ead55d22ae510d9118e4abe41338d43f Mon Sep 17 00:00:00 2001 From: mlykotom Date: Fri, 16 Dec 2022 22:08:16 +0100 Subject: [PATCH] Simplify selecting topics Change-Id: Icd5bcb361c7ccdf9ce907729ca3f65de41f34649 --- .../google/samples/apps/nowinandroid/foryou/ForYouActions.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/benchmarks/src/main/java/com/google/samples/apps/nowinandroid/foryou/ForYouActions.kt b/benchmarks/src/main/java/com/google/samples/apps/nowinandroid/foryou/ForYouActions.kt index e540b507e..b407dfcb1 100644 --- a/benchmarks/src/main/java/com/google/samples/apps/nowinandroid/foryou/ForYouActions.kt +++ b/benchmarks/src/main/java/com/google/samples/apps/nowinandroid/foryou/ForYouActions.kt @@ -45,9 +45,8 @@ fun MacrobenchmarkScope.forYouSelectTopics(recheckTopicsIfChecked: Boolean = fal // Select some topics to show some feed content repeat(3) { index -> - // Selecting topics that are in the first column. The visible topics are indexed horizontally first, - // so if we want to select the items in the column, we need to select the 0th, 2th, 4th index. - val topic = topics.children[(2 * index) % topics.childCount] + // Selecting some topics, which will populate items in the feed. + val topic = topics.children[index % topics.childCount] // Find the checkable element to figure out whether it's checked or not val topicCheckIcon = topic.findObject(By.checkable(true))