|
@@ -190,6 +190,9 @@ extension Onboarding {
|
|
|
|
|
|
|
|
// Apply glucose units
|
|
// Apply glucose units
|
|
|
settingsCopy.units = units
|
|
settingsCopy.units = units
|
|
|
|
|
+
|
|
|
|
|
+ // Apply targets
|
|
|
|
|
+ saveTargets()
|
|
|
|
|
|
|
|
// Apply basal profile
|
|
// Apply basal profile
|
|
|
// TODO: - should we use the return value or modify the function to not return anything?
|
|
// TODO: - should we use the return value or modify the function to not return anything?
|
|
@@ -199,6 +202,7 @@ extension Onboarding {
|
|
|
saveCarbRatios()
|
|
saveCarbRatios()
|
|
|
|
|
|
|
|
// Apply ISF values
|
|
// Apply ISF values
|
|
|
|
|
+ saveISFValues()
|
|
|
|
|
|
|
|
// Instead of using updateSettings which doesn't exist,
|
|
// Instead of using updateSettings which doesn't exist,
|
|
|
// we'll directly set the settings property which will trigger the didSet observer
|
|
// we'll directly set the settings property which will trigger the didSet observer
|
|
@@ -352,7 +356,7 @@ extension Onboarding.StateModel {
|
|
|
isfItems.append(newItem)
|
|
isfItems.append(newItem)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- func saveISFValue() {
|
|
|
|
|
|
|
+ func saveISFValues() {
|
|
|
guard isfValuesHaveChanges else { return }
|
|
guard isfValuesHaveChanges else { return }
|
|
|
|
|
|
|
|
let sensitivities = isfItems.map { item -> InsulinSensitivityEntry in
|
|
let sensitivities = isfItems.map { item -> InsulinSensitivityEntry in
|