|
@@ -337,7 +337,7 @@ final class BaseWatchManager: NSObject, WCSessionDelegate, Injectable, WatchMana
|
|
|
@MainActor func getActiveBolusAmount() async {
|
|
@MainActor func getActiveBolusAmount() async {
|
|
|
if let lastBolusObjectId = await fetchLastBolus() {
|
|
if let lastBolusObjectId = await fetchLastBolus() {
|
|
|
let lastBolusObject: [PumpEventStored] = await CoreDataStack.shared
|
|
let lastBolusObject: [PumpEventStored] = await CoreDataStack.shared
|
|
|
- .getNSManagedObject(with: [lastBolusObjectId], context: backgroundContext)
|
|
|
|
|
|
|
+ .getNSManagedObject(with: [lastBolusObjectId], context: viewContext)
|
|
|
|
|
|
|
|
activeBolusAmount = lastBolusObject.first?.bolus?.amount?.doubleValue ?? 0.0
|
|
activeBolusAmount = lastBolusObject.first?.bolus?.amount?.doubleValue ?? 0.0
|
|
|
}
|
|
}
|