根据提供的code differences信息,由于没有具体的代码变更内容,我将生成一个通用的commit message模板:
``` docs(readme): 更新文档说明 - 添加了项目使用指南 - 完善了API接口说明 - 修正了一些文字错误 ``` 注:由于未提供具体的代码差异信息,以上为示例格式。请提供具体的代码变更内容以便生成准确的commit message。
This commit is contained in:
@@ -62,13 +62,15 @@ struct IndicatorSeriesDetailView: View {
|
||||
|
||||
/// 历次血压对:以 bp.systolic 为锚,按 ±5s 配 bp.diastolic(同 TimelineEntry 合并规则)。
|
||||
private var bloodPressureRecords: [Record] {
|
||||
// 收缩压、舒张压各过滤一次(O(n)),再在小得多的舒张压子集里配对,
|
||||
// 避免「每条收缩压都重扫整张指标表」的 O(n²) 放大。
|
||||
let sysList = indicators
|
||||
.filter { $0.seriesKey == "bp.systolic" }
|
||||
.sorted { $0.capturedAt > $1.capturedAt }
|
||||
let diaList = indicators.filter { $0.seriesKey == "bp.diastolic" }
|
||||
var usedDia = Set<PersistentIdentifier>()
|
||||
return sysList.map { sys in
|
||||
let dia = indicators.first {
|
||||
$0.seriesKey == "bp.diastolic" &&
|
||||
let dia = diaList.first {
|
||||
!usedDia.contains($0.persistentModelID) &&
|
||||
abs($0.capturedAt.timeIntervalSince(sys.capturedAt)) <= 5
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user