Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Loop/Managers/LoopDataManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,19 @@ final class LoopDataManager {

self.insulinEffect = nil

self.notify(forChange: .bolus)
}
},
NotificationCenter.default.addObserver(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The addObserver above this is not specifying a name for notifications from doseStore. Could you add the right name? I believe it is DoseStore.valuesDidChange.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep I’ll probably be able to do that tomorrow night or this weekend.

forName: .InsulinDeliveryStoreCacheDidChange,
object: doseStore.insulinDeliveryStore,
queue: OperationQueue.main
) { (note) in
self.dataAccessQueue.async {
self.logger.default("Received notification of insulin delivery store cache changing")

self.insulinEffect = nil

self.notify(forChange: .bolus)
}
}
Expand Down