From f0ffc0e165d1966d3f84db0731bfee09b4b92334 Mon Sep 17 00:00:00 2001 From: "Martin.JM" Date: Mon, 28 Oct 2024 13:49:11 +0100 Subject: [PATCH] Add high res HR to activity sleep chart fragment --- .../activities/charts/ActivitySleepChartFragment.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/ActivitySleepChartFragment.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/ActivitySleepChartFragment.java index 672774d96..eb999280e 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/ActivitySleepChartFragment.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/ActivitySleepChartFragment.java @@ -129,7 +129,10 @@ public class ActivitySleepChartFragment extends AbstractActivityChartFragment refreshInBackground(ChartsHost chartsHost, DBHandler db, GBDevice device) { List samples = getSamples(db, device); - return refresh(device, samples); + List highResSamples = getSamplesHighRes(db, device); + if (highResSamples == null) + return refresh(device, samples); + return refresh(device, samples, highResSamples); } @Override @@ -192,4 +195,9 @@ public class ActivitySleepChartFragment extends AbstractActivityChartFragment getSamples(DBHandler db, GBDevice device, int tsFrom, int tsTo) { return getAllSamples(db, device, tsFrom, tsTo); } + + @Override + protected List getSamplesHighRes(DBHandler db, GBDevice device, int tsFrom, int tsTo) { + return getAllSamplesHighRes(db, device, tsFrom, tsTo); + } }