From 8aff0214f68e7f8fd0c004eaecef1d7d803f6bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Bj=C3=B6rkert?= Date: Fri, 4 Jul 2025 16:15:03 +0200 Subject: [PATCH 1/2] Clear override text conditionally based on device --- LoopFollow/Controllers/Nightscout/DeviceStatus.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/LoopFollow/Controllers/Nightscout/DeviceStatus.swift b/LoopFollow/Controllers/Nightscout/DeviceStatus.swift index 6374bdec8..6a6be6793 100644 --- a/LoopFollow/Controllers/Nightscout/DeviceStatus.swift +++ b/LoopFollow/Controllers/Nightscout/DeviceStatus.swift @@ -74,6 +74,11 @@ extension MainViewController { func updateDeviceStatusDisplay(jsonDeviceStatus: [[String: AnyObject]]) { infoManager.clearInfoData(types: [.iob, .cob, .override, .battery, .pump, .target, .isf, .carbRatio, .updated, .recBolus, .tdd]) + // For Loop, clear the current override here - For Trio, it is handled using treatments + if Storage.shared.device.value == "Loop" { + infoManager.clearInfoData(types: [.override]) + } + if jsonDeviceStatus.count == 0 { LogManager.shared.log(category: .deviceStatus, message: "Device status is empty") TaskScheduler.shared.rescheduleTask(id: .deviceStatus, to: Date().addingTimeInterval(5 * 60)) From a5a490cae95eb5c3d83583bc09017fc7c59e64d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Bj=C3=B6rkert?= Date: Fri, 4 Jul 2025 16:17:45 +0200 Subject: [PATCH 2/2] Clear override text conditionally based on device --- LoopFollow/Controllers/Nightscout/DeviceStatus.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LoopFollow/Controllers/Nightscout/DeviceStatus.swift b/LoopFollow/Controllers/Nightscout/DeviceStatus.swift index 6a6be6793..6eecfcc28 100644 --- a/LoopFollow/Controllers/Nightscout/DeviceStatus.swift +++ b/LoopFollow/Controllers/Nightscout/DeviceStatus.swift @@ -72,7 +72,7 @@ extension MainViewController { // NS Device Status Response Processor func updateDeviceStatusDisplay(jsonDeviceStatus: [[String: AnyObject]]) { - infoManager.clearInfoData(types: [.iob, .cob, .override, .battery, .pump, .target, .isf, .carbRatio, .updated, .recBolus, .tdd]) + infoManager.clearInfoData(types: [.iob, .cob, .battery, .pump, .target, .isf, .carbRatio, .updated, .recBolus, .tdd]) // For Loop, clear the current override here - For Trio, it is handled using treatments if Storage.shared.device.value == "Loop" {