DocumentScreen: trigger scrollToItem only when landing on the screen
This commit is contained in:
@@ -82,8 +82,8 @@ fun DocumentScreen(
|
|||||||
BackHandler { navigation.back() }
|
BackHandler { navigation.back() }
|
||||||
|
|
||||||
val listState = rememberLazyListState()
|
val listState = rememberLazyListState()
|
||||||
LaunchedEffect(currentPageIndex.intValue) {
|
LaunchedEffect(initialPage) {
|
||||||
listState.scrollToItem(currentPageIndex.intValue)
|
listState.scrollToItem(initialPage)
|
||||||
}
|
}
|
||||||
|
|
||||||
MyScaffold(
|
MyScaffold(
|
||||||
|
|||||||
Reference in New Issue
Block a user