refactor: 用 associateWith 简化星期标签 map 构造

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
xfy 2026-05-19 16:17:40 +08:00
parent 0d76b44c4e
commit b5debbe74d

View File

@ -128,8 +128,8 @@ fun YearGridView(
// P0-H: 预测量星期标签
val weekdayLayouts = remember(textMeasurer, colors) {
WEEKDAY_LABELS.associate { label ->
label to textMeasurer.measure(label, TextStyle(fontSize = 8.sp, color = colors.weekday))
WEEKDAY_LABELS.associateWith { label ->
textMeasurer.measure(label, TextStyle(fontSize = 8.sp, color = colors.weekday))
}
}