Преглед изворни кода

Emit updatePublisher on single-reading stores so alarm coordinator wakes up

trioneer пре 3 недеља
родитељ
комит
baf03b68a0
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      Trio/Sources/APS/Storage/GlucoseStorage.swift

+ 1 - 1
Trio/Sources/APS/Storage/GlucoseStorage.swift

@@ -214,6 +214,7 @@ final class BaseGlucoseStorage: GlucoseStorage, Injectable {
 
         guard context.hasChanges else { return }
         try context.save()
+        updateSubject.send()
     }
 
     private func storeGlucoseBatch(_ glucose: [BloodGlucose]) throws {
@@ -232,7 +233,6 @@ final class BaseGlucoseStorage: GlucoseStorage, Injectable {
             }
         )
         try context.execute(batchInsert)
-        // Only send update for batch insert since regular save triggers CoreData notifications
         updateSubject.send()
     }