[优化] 底部导航栏在跨页面滑动时的图标闪现 (#734)
* 底栏修改:currentpage改成 targetpage * 平板端导航栏切换修改成 targetPage --------- Co-authored-by: ChanglePan <ncort@qq.com>
This commit is contained in:
1 parent
3e283cf7a3
commit
adbbc87892
1 file changed
+2
-2
@@ -139,7 +139,7 @@ fun MainScreen(
|
|||||||
) {
|
) {
|
||||||
val labelVisibilityMode = MainConfig.labelVisibilityMode
|
val labelVisibilityMode = MainConfig.labelVisibilityMode
|
||||||
destinations.forEachIndexed { index, destination ->
|
destinations.forEachIndexed { index, destination ->
|
||||||
val selected = pagerState.currentPage == index
|
val selected = pagerState.targetPage == index
|
||||||
WideNavigationRailItem(
|
WideNavigationRailItem(
|
||||||
railExpanded = navState.targetValue == WideNavigationRailValue.Expanded,
|
railExpanded = navState.targetValue == WideNavigationRailValue.Expanded,
|
||||||
selected = selected,
|
selected = selected,
|
||||||
@@ -180,7 +180,7 @@ fun MainScreen(
|
|||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
destinations.forEachIndexed { index, destination ->
|
destinations.forEachIndexed { index, destination ->
|
||||||
val selected = pagerState.currentPage == index
|
val selected = pagerState.targetPage == index
|
||||||
NavigationBarItem(
|
NavigationBarItem(
|
||||||
selected = selected,
|
selected = selected,
|
||||||
onClick = {
|
onClick = {
|
||||||
|
|||||||
Reference in new issue
Block a user