From 2f2c9f128cd825406e4d02e3578354049c092792 Mon Sep 17 00:00:00 2001 From: Pete Schwamb Date: Tue, 13 Oct 2026 11:16:43 -0500 Subject: [PATCH] Tag historical and clinical gap-fill readings as backfill Samples forwarded from historical pages and from the clinical gap-fill stream are marked isBackfill; realtime samples are not. --- LibreLoop/Pairing/LibreLoopCGMManager+Pairing.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/LibreLoop/Pairing/LibreLoopCGMManager+Pairing.swift b/LibreLoop/Pairing/LibreLoopCGMManager+Pairing.swift index 0907f0a..6aa8405 100644 --- a/LibreLoop/Pairing/LibreLoopCGMManager+Pairing.swift +++ b/LibreLoop/Pairing/LibreLoopCGMManager+Pairing.swift @@ -703,7 +703,8 @@ extension LibreLoopCGMManager { // duplicate point at the same timestamp. syncIdentifier: "libreloop-\(serial)-\(sample.lifeCount)", syncVersion: 1, - device: device + device: device, + isBackfill: true )) backfillForwardedLifeCounts.insert(sample.lifeCount) } @@ -806,7 +807,8 @@ extension LibreLoopCGMManager { wasUserEntered: false, syncIdentifier: "libreloop-\(serial)-\(lifeCount)", syncVersion: 1, - device: device + device: device, + isBackfill: true ) backfillForwardedLifeCounts.insert(lifeCount) llog("forwarded clinical \(kind) sample to Loop: \(mgdl) mg/dL lifeCount=\(lifeCount) sampleDate=\(date.timeIntervalSince1970)")