[优化] 底部导航栏在跨页面滑动时的图标闪现 (#734)
* 底栏修改:currentpage改成 targetpage * 平板端导航栏切换修改成 targetPage --------- Co-authored-by: ChanglePan <ncort@qq.com>
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user