Skip to content

Commit 62bed2b

Browse files
committed
transfer v2.2.10 updates from LF to LF_3
1 parent cf3dbd3 commit 62bed2b

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

Config.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
unique_id = ${DEVELOPMENT_TEAM}
77

88
//Version (DEFAULT)
9-
LOOP_FOLLOW_MARKETING_VERSION = 2.2.9
9+
LOOP_FOLLOW_MARKETING_VERSION = 2.2.10

LoopFollow/Controllers/Nightscout/DeviceStatusOpenAPS.swift

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,22 @@ extension MainViewController {
159159
infoManager.updateInfoData(type: .tdd, value: tddMetric)
160160
}
161161

162+
163+
let predBGsData: [String: AnyObject]? = {
164+
if let enacted = lastLoopRecord["suggested"] as? [String: AnyObject],
165+
let predBGs = enacted["predBGs"] as? [String: AnyObject] {
166+
return predBGs
167+
} else if let suggested = lastLoopRecord["enacted"] as? [String: AnyObject],
168+
let predBGs = suggested["predBGs"] as? [String: AnyObject] {
169+
return predBGs
170+
}
171+
return nil
172+
}()
173+
162174
let predictioncolor = UIColor.systemGray
163175
PredictionLabel.textColor = predictioncolor
164176
topPredictionBG = UserDefaultsRepository.minBGScale.value
165-
if let predbgdata = enactedOrSuggested["predBGs"] as? [String: AnyObject] {
177+
if let predbgdata = predBGsData {
166178
let predictionTypes: [(type: String, colorName: String, dataIndex: Int)] = [
167179
("ZT", "ZT", 12),
168180
("IOB", "Insulin", 13),

0 commit comments

Comments
 (0)