Skip to content

Commit effeae0

Browse files
author
Darin Krauss
authored
[LOOP-1274] Fetch prescription from Tidepool backend (#393)
- https://tidepool.atlassian.net/browse/LOOP-1274 - Move mode from view model into SettingsView - Move chart color palette from view model into environment
1 parent fca8543 commit effeae0

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

Loop/Views/SettingsView.swift

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,16 @@ extension SettingsView {
114114
label: NSLocalizedString("Therapy Settings", comment: "Title text for button to Therapy Settings"),
115115
descriptiveText: NSLocalizedString("Diabetes Treatment", comment: "Descriptive text for Therapy Settings"))
116116
.sheet(isPresented: $therapySettingsIsPresented) {
117-
TherapySettingsView(
118-
viewModel: TherapySettingsViewModel(mode: .settings,
119-
therapySettings: self.viewModel.therapySettings(),
120-
supportedInsulinModelSettings: self.viewModel.supportedInsulinModelSettings,
121-
pumpSupportedIncrements: self.viewModel.pumpSupportedIncrements,
122-
syncPumpSchedule: self.viewModel.syncPumpSchedule,
123-
chartColors: .primary,
124-
didSave: self.viewModel.didSave))
117+
TherapySettingsView(mode: .settings,
118+
viewModel: TherapySettingsViewModel(therapySettings: self.viewModel.therapySettings(),
119+
supportedInsulinModelSettings: self.viewModel.supportedInsulinModelSettings,
120+
pumpSupportedIncrements: self.viewModel.pumpSupportedIncrements,
121+
syncPumpSchedule: self.viewModel.syncPumpSchedule,
122+
didSave: self.viewModel.didSave))
125123
.environmentObject(displayGlucoseUnitObservable)
126124
.environment(\.dismiss, self.dismiss)
127125
.environment(\.appName, self.appName)
126+
.environment(\.chartColorPalette, .primary)
128127
.environment(\.carbTintColor, self.carbTintColor)
129128
.environment(\.glucoseTintColor, self.glucoseTintColor)
130129
.environment(\.guidanceColors, self.guidanceColors)

0 commit comments

Comments
 (0)