feat(indicator): 长期监测预设支持长按隐藏 + 恢复
- UserProfile 加 hiddenPresetMetrics: [String],存被隐藏的 MonitorMetric.rawValue - IndicatorQuickSheet monitorTile 加 contextMenu 隐藏入口 - section label 右侧"已隐藏 N 个 ›"chip 触发 HiddenMonitorRestoreSheet - 纯 UI 过滤,不动 Indicator 历史 / Trends 折线 / MetricReminder Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,11 @@ final class UserProfile {
|
||||
// —— 当前用药 ——
|
||||
var currentMedications: [String]
|
||||
|
||||
// —— UI 偏好 ——
|
||||
// 用户在 IndicatorQuickSheet 长按隐藏的 MonitorMetric.rawValue。
|
||||
// 只影响录入 grid,不影响 Indicator 历史 / Trends / Reminder。
|
||||
var hiddenPresetMetrics: [String]
|
||||
|
||||
var updatedAt: Date
|
||||
|
||||
init(birthYear: Int? = nil,
|
||||
@@ -29,6 +34,7 @@ final class UserProfile {
|
||||
chronicConditions: [String] = [],
|
||||
familyHistory: [String] = [],
|
||||
currentMedications: [String] = [],
|
||||
hiddenPresetMetrics: [String] = [],
|
||||
updatedAt: Date = .now) {
|
||||
self.birthYear = birthYear
|
||||
self.biologicalSexRaw = biologicalSexRaw
|
||||
@@ -39,6 +45,7 @@ final class UserProfile {
|
||||
self.chronicConditions = chronicConditions
|
||||
self.familyHistory = familyHistory
|
||||
self.currentMedications = currentMedications
|
||||
self.hiddenPresetMetrics = hiddenPresetMetrics
|
||||
self.updatedAt = updatedAt
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user