Skip to content

Commit

Permalink
[LOOP-4942] Fix path to BolusEntryView with missing guidanceColors
Browse files Browse the repository at this point in the history
  • Loading branch information
Camji55 authored Aug 5, 2024
2 parents d7149e1 + bfa714b commit 4fa7686
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Loop/View Controllers/CarbAbsorptionViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 2 additions & 0 deletions Loop/Views/CarbEntryView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -130,6 +131,7 @@ struct CarbEntryView: View, HorizontalSizeClassOverride {
BolusEntryView(viewModel: viewModel)
.environmentObject(displayGlucosePreference)
.environment(\.dismissAction, dismiss)
.environment(\.guidanceColors, guidanceColors)
}
}

Expand Down

0 comments on commit 4fa7686

Please sign in to comment.