From 4e800c3b5cbbc8410d063da6540c02fc1f11d347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20M=C3=A5rtensson?= Date: Fri, 16 Feb 2024 17:34:28 +0100 Subject: [PATCH] Limit Query to Health Store to 100 entries. Part of a previous commit which needed to reverted, due to a fatal error. --- FreeAPS/Sources/Services/HealthKit/HealthKitManager.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FreeAPS/Sources/Services/HealthKit/HealthKitManager.swift b/FreeAPS/Sources/Services/HealthKit/HealthKitManager.swift index 4696fb2e24..fbd2d35595 100644 --- a/FreeAPS/Sources/Services/HealthKit/HealthKitManager.swift +++ b/FreeAPS/Sources/Services/HealthKit/HealthKitManager.swift @@ -424,7 +424,7 @@ final class BaseHealthKitManager: HealthKitManager, Injectable, CarbsObserver, P let query = HKSampleQuery( sampleType: sampleType, predicate: nil, - limit: 1000, + limit: 100, sortDescriptors: nil ) { _, results, _ in promise(.success((results as? [HKQuantitySample]) ?? [])) @@ -447,7 +447,7 @@ final class BaseHealthKitManager: HealthKitManager, Injectable, CarbsObserver, P let query = HKSampleQuery( sampleType: sampleType, predicate: predicate, - limit: 1000, + limit: 100, sortDescriptors: nil ) { _, results, _ in promise(.success((results as? [HKQuantitySample]) ?? []))