fix(ui): 修复滑动切换年份后再进年视图导致的页码联动错位 bug

This commit is contained in:
xfy 2026-07-23 15:45:00 +08:00
parent e663ed5c8e
commit 19c9feb6de

View File

@ -178,12 +178,9 @@ fun CalendarMonthView(
pageCount = { Int.MAX_VALUE }
)
// 视图切换时自动关闭菜单并重置年视图 Pager
// 视图切换时自动关闭菜单
LaunchedEffect(isYearView) {
isMenuExpanded = false
if (isYearView && yearPagerState.currentPage != START_PAGE) {
yearPagerState.scrollToPage(START_PAGE)
}
}
// 年视图翻页时同步 yearViewYear跟踪 settled page 差值)