docs(claude): sync §5/§7/§10 with Monitor+Profile; fix SeriesBucket SwiftData import
- §5 schema 重写为 7 @Model 完整列表(含 UserProfile + Indicator.seriesKey) - §7 IA 改成 5 槽 TabBar(2 内容 + 中间 + + 2 设置),记录入口 5 个 kind - §10.6 红线例外清单加 Monitor + Profile(Symptom 也补上) - SeriesBucket.swift 缺 import SwiftData(persistentModelID 报错) 全套测试 50 case pass / 0 fail / 0 warning。
This commit is contained in:
@@ -32,8 +32,11 @@ enum TimelineGrouping {
|
||||
static func section(for date: Date,
|
||||
now: Date = .now,
|
||||
calendar: Calendar = .current) -> DateSection {
|
||||
if calendar.isDateInToday(date) { return .today }
|
||||
if calendar.isDateInYesterday(date) { return .yesterday }
|
||||
if calendar.isDate(date, inSameDayAs: now) { return .today }
|
||||
if let yesterday = calendar.date(byAdding: .day, value: -1, to: now),
|
||||
calendar.isDate(date, inSameDayAs: yesterday) {
|
||||
return .yesterday
|
||||
}
|
||||
if calendar.isDate(date, equalTo: now, toGranularity: .weekOfYear) {
|
||||
return .thisWeek
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user