DocumentScreen: trigger scrollToItem only when landing on the screen

This commit is contained in:
Pierre-Yves Nicolas
2025-09-27 16:02:32 +02:00
parent 56e0447ae6
commit 8d9609dd0a

View File

@@ -82,8 +82,8 @@ fun DocumentScreen(
BackHandler { navigation.back() }
val listState = rememberLazyListState()
LaunchedEffect(currentPageIndex.intValue) {
listState.scrollToItem(currentPageIndex.intValue)
LaunchedEffect(initialPage) {
listState.scrollToItem(initialPage)
}
MyScaffold(