Skip to content

Commit

Permalink
Fix upload last historic records
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Allène committed Mar 1, 2024
1 parent ab7b13e commit 81424b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xdrip/Managers/OpenGlückManager/OpenGlückManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public class OpenGlückManager: NSObject, OpenGlückSyncClientDelegate {
// we should store scan readings and re-upload them later -- though not sure this is a feature we'd want

// reupload at least 4 historic records + scans
let uploadHistoricAfter = (UserDefaults.standard.timeStampLatestOpenGlückBgReading ?? Date().addingTimeInterval(-86400)).addingTimeInterval(-intervalBetweenHistoricRecords)
let uploadHistoricAfter = (UserDefaults.standard.timeStampLatestOpenGlückBgReading ?? Date().addingTimeInterval(-86400)).addingTimeInterval(-historicScanTipoffInterval)
let glucoseRecordsToUpload: [OpenGlückGlucoseRecord] = (
historics.map ({
OpenGlückGlucoseRecord(timestamp: $0.timeStamp, mgDl: Int(round($0.calculatedValue)), recordType: "historic")
Expand Down

0 comments on commit 81424b2

Please sign in to comment.