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

Fix sleep score for current day

This commit is contained in:
José Rebelo 2024-12-05 06:56:14 +00:00
parent 7a4fb57646
commit d850439b4e

View File

@ -148,7 +148,7 @@ public class DaySleepChartFragment extends AbstractActivityChartFragment<DaySlee
int sleepScore = 0; int sleepScore = 0;
if (!sleepScoreSamples.isEmpty()) { if (!sleepScoreSamples.isEmpty()) {
sleepScore = sleepScoreSamples.get(0).getSleepScore(); sleepScore = sleepScoreSamples.get(sleepScoreSamples.size() - 1).getSleepScore();
} }
return new MySleepChartsData(sleepSessions, totalSeconds, awakeSleepDuration, remSleepDuration, deepSleepDuration, lightSleepDuration, sleepScore); return new MySleepChartsData(sleepSessions, totalSeconds, awakeSleepDuration, remSleepDuration, deepSleepDuration, lightSleepDuration, sleepScore);