5 Commits

Author SHA1 Message Date
xfy
d3befaabec test: 新增 ShiftPattern、CalendarUtils、CalendarViewModel 单元测试
- ShiftPatternTest: 锚点前后、跨周期循环、负天数取模、空 cycle、
  单元素 cycle、多样化周期、data class 属性
- CalendarUtilsExtraTest: calculateWeeksCountForPage(跨月/跨年)、
  relativeDayDescription(今天/昨天/明天/N天前后/跨年月)、
  formatLunarDate(农历前缀/正月初一/多日期验证)
- CalendarViewModelStateTest: 初始状态、selectDate(含 currentMonth/Year 联动)、
  increment/decrementYear、selectMonthFromYearView、shiftKindAt、
  showLegalHoliday、onDrag/onExpandDrag progress 更新与 clamp、
  getMonthDays 与 selectedDate/today 交互

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 11:47:08 +08:00
meyou
a478ecb1bd
修复月视图首帧行堆叠:rowHeightPx 未就绪时 alpha=0
draw 阶段已读到更新后的 rowHeightPx,但 layout 仍用旧值时会出现行堆叠。
增加 layoutReady 守卫,首帧 rowHeightPx==0 时直接隐藏月视图。
2026-05-18 22:06:58 +08:00
xfy
f618d09458 Reformat code style across shared module
Apply consistent formatting: import ordering, line wrapping,
indentation, and XML normalization. No functional changes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 17:57:18 +08:00
xfy
9648afc561 Add unit tests for CalendarViewModel and CalendarUtils
Inject Clock into CalendarViewModel for testability, add kotlinx-coroutines-test dependency, replace placeholder test with real coverage for ISO week numbers, month day grids, page mapping, and utility functions.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 15:42:01 +08:00
xfy
07f6b779c6 Refactor KMP project structure for AGP 9.0 compatibility
Split composeApp into shared (KMP library) and androidApp (Android application)
modules to resolve KMP + AGP 9.0 incompatibility. Remove deprecated gradle
properties and add performance optimization settings.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 11:47:26 +08:00