From 889a54db0e427f4fc741f9ba6d19752796e48b09 Mon Sep 17 00:00:00 2001 From: meyou <2636699780@qq.com> Date: Sat, 16 May 2026 17:30:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8A=98=E5=8F=A0=E5=91=A8?= =?UTF-8?q?=E8=A7=86=E5=9B=BE=E8=B7=A8=E6=9C=88=E6=97=A5=E6=9C=9F=E6=9C=AA?= =?UTF-8?q?=E7=BD=AE=E7=81=B0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WeekPager 之前把 isCurrentMonth 硬编码成 true,导致折叠状态下 当前周里属于上/下个月的日期没有变灰,与展开月视图的灰显约定不 一致。改为按 selectedDate 的年月判定(与 MonthHeader 显示的 月份一致),保持折叠前后的视觉一致性。 --- shared/src/commonMain/kotlin/plus/rua/project/ui/WeekPager.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shared/src/commonMain/kotlin/plus/rua/project/ui/WeekPager.kt b/shared/src/commonMain/kotlin/plus/rua/project/ui/WeekPager.kt index 97f7a13..45ba90b 100644 --- a/shared/src/commonMain/kotlin/plus/rua/project/ui/WeekPager.kt +++ b/shared/src/commonMain/kotlin/plus/rua/project/ui/WeekPager.kt @@ -78,7 +78,8 @@ fun WeekPager( val date = weekMonday.plus(DatePeriod(days = dayOffset)) DayCell( date = date, - isCurrentMonth = true, + isCurrentMonth = date.month == selectedDate.month + && date.year == selectedDate.year, isSelected = date == selectedDate, isToday = date == today, onClick = { onDateClick(date) },