|
@@ -216,7 +216,6 @@ final class BaseCalendarManager: CalendarManager, Injectable {
|
|
|
if determinationId == previousDeterminationId {
|
|
if determinationId == previousDeterminationId {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
- previousDeterminationId = determinationId
|
|
|
|
|
|
|
|
|
|
let glucoseIds = await fetchGlucose()
|
|
let glucoseIds = await fetchGlucose()
|
|
|
|
|
|
|
@@ -298,6 +297,9 @@ final class BaseCalendarManager: CalendarManager, Injectable {
|
|
|
|
|
|
|
|
try eventStore.save(event, span: .thisEvent)
|
|
try eventStore.save(event, span: .thisEvent)
|
|
|
|
|
|
|
|
|
|
+ // Save the determination ID so we can avoid updating calendar if this determination comes back
|
|
|
|
|
+ previousDeterminationId = determinationId
|
|
|
|
|
+
|
|
|
} catch {
|
|
} catch {
|
|
|
debugPrint(
|
|
debugPrint(
|
|
|
"\(DebuggingIdentifiers.failed) \(#file) \(#function) Failed to create calendar event: \(error.localizedDescription)"
|
|
"\(DebuggingIdentifiers.failed) \(#file) \(#function) Failed to create calendar event: \(error.localizedDescription)"
|