@@ -45,6 +45,7 @@ extension WatchHistoricalGlucose: RawRepresentable {
4545 let isDisplayOnlys : [ Bool ]
4646 let wasUserEntereds : [ Bool ]
4747 let devices : [ Data ? ]
48+ let healthKitEligibleDates : [ Date ? ]
4849
4950 init ( samples: [ StoredGlucoseSample ] ) {
5051 self . uuids = samples. map { $0. uuid }
@@ -57,20 +58,22 @@ extension WatchHistoricalGlucose: RawRepresentable {
5758 self . isDisplayOnlys = samples. map { $0. isDisplayOnly }
5859 self . wasUserEntereds = samples. map { $0. wasUserEntered }
5960 self . devices = samples. map { try ? WatchHistoricalGlucose . encoder. encode ( $0. device) }
61+ self . healthKitEligibleDates = samples. map { $0. healthKitEligibleDate }
6062 }
6163
6264 var samples : [ StoredGlucoseSample ] {
6365 return ( 0 ..< uuids. count) . map {
6466 return StoredGlucoseSample ( uuid: uuids [ $0] ,
65- provenanceIdentifier: provenanceIdentifiers [ $0] ,
66- syncIdentifier: syncIdentifiers [ $0] ,
67- syncVersion: syncVersions [ $0] ,
68- startDate: startDates [ $0] ,
69- quantity: HKQuantity ( unit: . milligramsPerDeciliter, doubleValue: quantities [ $0] ) ,
70- trend: trends [ $0] ,
71- isDisplayOnly: isDisplayOnlys [ $0] ,
72- wasUserEntered: wasUserEntereds [ $0] ,
73- device: devices [ $0] . flatMap { try ? HKDevice ( from: $0) } )
67+ provenanceIdentifier: provenanceIdentifiers [ $0] ,
68+ syncIdentifier: syncIdentifiers [ $0] ,
69+ syncVersion: syncVersions [ $0] ,
70+ startDate: startDates [ $0] ,
71+ quantity: HKQuantity ( unit: . milligramsPerDeciliter, doubleValue: quantities [ $0] ) ,
72+ trend: trends [ $0] ,
73+ isDisplayOnly: isDisplayOnlys [ $0] ,
74+ wasUserEntered: wasUserEntereds [ $0] ,
75+ device: devices [ $0] . flatMap { try ? HKDevice ( from: $0) } ,
76+ healthKitEligibleDate: healthKitEligibleDates [ $0] )
7477 }
7578 }
7679 }
0 commit comments