[优化] 底部导航栏在跨页面滑动时的图标闪现 (#734)

* 底栏修改:currentpage改成 targetpage

* 平板端导航栏切换修改成 targetPage

---------

Co-authored-by: ChanglePan <ncort@qq.com>
This commit is contained in:
5151561
2026-03-20 00:31:26 +08:00
committed by GitHub
co-authored by ChanglePan
parent 3e283cf7a3
commit adbbc87892
@@ -139,7 +139,7 @@ fun MainScreen(
) {
val labelVisibilityMode = MainConfig.labelVisibilityMode
destinations.forEachIndexed { index, destination ->
val selected = pagerState.currentPage == index
val selected = pagerState.targetPage == index
WideNavigationRailItem(
railExpanded = navState.targetValue == WideNavigationRailValue.Expanded,
selected = selected,
@@ -180,7 +180,7 @@ fun MainScreen(
else -> false
}
destinations.forEachIndexed { index, destination ->
val selected = pagerState.currentPage == index
val selected = pagerState.targetPage == index
NavigationBarItem(
selected = selected,
onClick = {