Просмотр исходного кода

Ensure external insulin is uploaded to TP; handle publishing issue

Deniz Cengiz 1 год назад
Родитель
Сommit
2701bfa079

+ 1 - 0
FreeAPS/Sources/APS/Storage/PumpHistoryStorage.swift

@@ -236,6 +236,7 @@ final class BasePumpHistoryStorage: PumpHistoryStorage, Injectable {
             newPumpEvent.type = PumpEvent.bolus.rawValue
             newPumpEvent.isUploadedToNS = false
             newPumpEvent.isUploadedToHealth = false
+            newPumpEvent.isUploadedToTidepool = false
 
             // create bolus entry and specify relationship to pump event
             let newBolusEntry = BolusStored(context: self.context)

+ 4 - 1
FreeAPS/Sources/Modules/Bolus/BolusStateModel.swift

@@ -395,7 +395,10 @@ extension Bolus {
 
                 // if glucose data is stale end the custom loading animation by hiding the modal
                 guard glucoseStorage.isGlucoseDataFresh(glucoseFromPersistence.first?.date) else {
-                    waitForSuggestion = false
+                    await MainActor.run {
+                        waitForSuggestion = false
+                    }
+
                     return hideModal()
                 }
             }