mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-24 02:46:50 +01:00
Check for non empty list of sleep sessions
This commit is contained in:
parent
b5e3374a9e
commit
5c0c5ed952
@ -75,6 +75,7 @@ public class SleepChartFragment extends AbstractChartFragment {
|
||||
List<? extends ActivitySample> samples = getSamplesofSleep(db, device);
|
||||
|
||||
MySleepChartsData mySleepChartsData = refreshSleepAmounts(device, samples);
|
||||
if (mySleepChartsData.sleepSessions.size()>0) {
|
||||
long tstart = mySleepChartsData.sleepSessions.get(0).getSleepStart().getTime() / 1000;
|
||||
long tend = mySleepChartsData.sleepSessions.get(mySleepChartsData.sleepSessions.size() - 1).getSleepEnd().getTime() / 1000;
|
||||
|
||||
@ -84,6 +85,7 @@ public class SleepChartFragment extends AbstractChartFragment {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
DefaultChartsData chartsData = refresh(device, samples);
|
||||
|
||||
return new MyChartsData(mySleepChartsData, chartsData);
|
||||
|
Loading…
Reference in New Issue
Block a user