1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-27 19:15:50 +01:00

Add high res HR to activity sleep chart fragment

This commit is contained in:
Martin.JM 2024-10-28 13:49:11 +01:00 committed by José Rebelo
parent 82e3a86350
commit f0ffc0e165

View File

@ -129,7 +129,10 @@ public class ActivitySleepChartFragment extends AbstractActivityChartFragment<De
@Override
protected DefaultChartsData<LineData> refreshInBackground(ChartsHost chartsHost, DBHandler db, GBDevice device) {
List<? extends ActivitySample> samples = getSamples(db, device);
return refresh(device, samples);
List<? extends ActivitySample> 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<De
protected List<? extends ActivitySample> getSamples(DBHandler db, GBDevice device, int tsFrom, int tsTo) {
return getAllSamples(db, device, tsFrom, tsTo);
}
@Override
protected List<? extends ActivitySample> getSamplesHighRes(DBHandler db, GBDevice device, int tsFrom, int tsTo) {
return getAllSamplesHighRes(db, device, tsFrom, tsTo);
}
}