fix: 返回动态页面时自动滚动至顶部

This commit is contained in:
HuanCheng65 2023-07-14 23:38:57 +08:00
parent a3ce72a971
commit f65e4b7f6f
No known key found for this signature in database
GPG Key ID: 5EC9DD60A32C7360
1 changed files with 1 additions and 4 deletions

View File

@ -127,6 +127,7 @@ fun PersonalizedPage(
if (showRefreshTip) {
LaunchedEffect(Unit) {
lazyStaggeredGridState.scrollToItem(0, 0)
delay(2000)
showRefreshTip = false
}
@ -184,10 +185,6 @@ fun PersonalizedPage(
},
state = lazyStaggeredGridState
)
LaunchedEffect(data.firstOrNull()?.get { id }) {
//delay(50)
lazyStaggeredGridState.scrollToItem(0, 0)
}
}
PullRefreshIndicator(