فهرست منبع

Ensure external insulin is uploaded to TP; handle publishing issue

Deniz Cengiz 1 سال پیش
والد
کامیت
2701bfa079
2فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 1 0
      FreeAPS/Sources/APS/Storage/PumpHistoryStorage.swift
  2. 4 1
      FreeAPS/Sources/Modules/Bolus/BolusStateModel.swift

+ 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()
                 }
             }