Skip to content

Instantly share code, notes, and snippets.

@Ahmad-Hamwi
Created March 19, 2023 20:17
Show Gist options
  • Save Ahmad-Hamwi/538a2b0ed39c1c23ea34145dffad73a3 to your computer and use it in GitHub Desktop.
Save Ahmad-Hamwi/538a2b0ed39c1c23ea34145dffad73a3 to your computer and use it in GitHub Desktop.
operator fun component2(): (Int) -> Unit = {
...
coroutineScope.launch {
if (smoothScroll) {
lazyListState.animateScrollToItem(syncedIndices[selectedTabIndex])
} else {
lazyListState.scrollToItem(syncedIndices[selectedTabIndex])
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment