Explorar el Código

App Badge hard coded in mmol/l * 10

Jon Mårtensson hace 4 años
padre
commit
f4439042a2
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      FreeAPS/Sources/APS/DeviceDataManager.swift

+ 2 - 2
FreeAPS/Sources/APS/DeviceDataManager.swift

@@ -107,7 +107,7 @@ final class BaseDeviceDataManager: DeviceDataManager, Injectable {
             let lastGlucose: BloodGlucose? = self.glucoseStorage.recent().last
             if lastGlucose != nil {
                 if date.timeIntervalSince(lastGlucose!.dateString) < 5.1 * 60 {
-                    content.badge = NSNumber(value: lastGlucose!.glucose ?? 0)
+                    content.badge = NSNumber(value: lastGlucose!.glucose! * 10 / 18) // mmol/l value * 10
                 }
             }
 
@@ -121,7 +121,7 @@ final class BaseDeviceDataManager: DeviceDataManager, Injectable {
                 UNUserNotificationCenter.current().add(request)
             }
 
-            var updateInterval: TimeInterval = 1.5 * 60
+            var updateInterval: TimeInterval = 1 * 60
 
             switch date.timeIntervalSince(lastHeartBeatTime) {
             case let interval where interval > 10.minutes.timeInterval: