Explorar o código

fetch carbs of the last 24h

polscm32 %!s(int64=2) %!d(string=hai) anos
pai
achega
22eeedfbf3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      FreeAPS/Sources/APS/OpenAPS/OpenAPS.swift

+ 1 - 1
FreeAPS/Sources/APS/OpenAPS/OpenAPS.swift

@@ -113,7 +113,7 @@ final class OpenAPS {
     private func fetchCarbs() -> [CarbEntryStored]? {
         do {
             debugPrint("OpenAPS: \(#function) \(DebuggingIdentifiers.succeeded) fetched carbs")
-            return try context.fetch(CarbEntryStored.fetch(NSPredicate.predicateFor30MinAgo, ascending: true))
+            return try context.fetch(CarbEntryStored.fetch(NSPredicate.predicateForOneDayAgo, ascending: false))
         } catch {
             debugPrint("OpenAPS: \(#function) \(DebuggingIdentifiers.failed) failed to fetch carbs with error: \(error)")
             return []