Skip to content

Commit

Permalink
refactor: Simplify onboarding isHighlighted update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
LunarX committed Dec 4, 2024
1 parent 0d8914a commit 6f4cbe5
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ fun OnboardingScreen(goToMainActivity: () -> Unit) {
// Start the highlighting of the text when the associated page is reached in the HorizontalPager
LaunchedEffect(pagerState.currentPage) {
val currentPage = Page.entries[pagerState.currentPage]
val setIsHighlighted = isHighlighted[currentPage]?.component2()
setIsHighlighted?.invoke(true)
isHighlighted[currentPage]?.value = true
}

BackHandler(pagerState.currentPage > 0) {
Expand Down

0 comments on commit 6f4cbe5

Please sign in to comment.