diff --git a/Loop/View Controllers/CarbAbsorptionViewController.swift b/Loop/View Controllers/CarbAbsorptionViewController.swift index 88aefd7c5..31f06e96a 100644 --- a/Loop/View Controllers/CarbAbsorptionViewController.swift +++ b/Loop/View Controllers/CarbAbsorptionViewController.swift @@ -467,7 +467,7 @@ final class CarbAbsorptionViewController: LoopChartsTableViewController, Identif let carbEntryView = CarbEntryView(viewModel: viewModel) .environmentObject(deviceManager.displayGlucosePreference) .environment(\.dismissAction, carbEditWasCanceled) - let hostingController = UIHostingController(rootView: carbEntryView) + let hostingController = DismissibleHostingController(rootView: carbEntryView) hostingController.title = "Edit Carb Entry" hostingController.navigationItem.largeTitleDisplayMode = .never let leftBarButton = UIBarButtonItem(title: "Back", style: .plain, target: self, action: #selector(carbEditWasCanceled)) diff --git a/Loop/Views/CarbEntryView.swift b/Loop/Views/CarbEntryView.swift index 130773297..63e832d84 100644 --- a/Loop/Views/CarbEntryView.swift +++ b/Loop/Views/CarbEntryView.swift @@ -14,6 +14,7 @@ import HealthKit struct CarbEntryView: View, HorizontalSizeClassOverride { @EnvironmentObject private var displayGlucosePreference: DisplayGlucosePreference @Environment(\.dismissAction) private var dismiss + @Environment(\.guidanceColors) private var guidanceColors @ObservedObject var viewModel: CarbEntryViewModel @@ -130,6 +131,7 @@ struct CarbEntryView: View, HorizontalSizeClassOverride { BolusEntryView(viewModel: viewModel) .environmentObject(displayGlucosePreference) .environment(\.dismissAction, dismiss) + .environment(\.guidanceColors, guidanceColors) } }