Only scrolls to the top if not at the top
This commit is contained in:
@@ -104,9 +104,11 @@ private fun FeedLoaded(
|
||||
|
||||
if (scrollToTop) {
|
||||
LaunchedEffect(Unit) {
|
||||
if (listState.firstVisibleItemIndex > 0 || listState.firstVisibleItemScrollOffset > 0) {
|
||||
listState.scrollToItem(index = 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LazyColumn(
|
||||
contentPadding = PaddingValues(
|
||||
|
||||
@@ -119,9 +119,11 @@ private fun FeedLoaded(
|
||||
|
||||
if (scrollToTop) {
|
||||
LaunchedEffect(Unit) {
|
||||
if (listState.firstVisibleItemIndex > 0 || listState.firstVisibleItemScrollOffset > 0) {
|
||||
listState.scrollToItem(index = 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val baseModifier = remember {
|
||||
Modifier
|
||||
|
||||
Reference in New Issue
Block a user