mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Fix inconsistent sleep scores
This commit is contained in:
+2
-2
@@ -315,8 +315,8 @@ public class SleepPeriodFragment extends SleepFragment<SleepPeriodFragment.MyCha
|
||||
// Sleep score
|
||||
if (supportsSleepScore()) {
|
||||
List<? extends SleepScoreSample> sleepScoreSamples = getSleepScoreSamples(db, device, day);
|
||||
if (!sleepScoreSamples.isEmpty() && sleepScoreSamples.get(0).getSleepScore() > 0) {
|
||||
sleepScoreEntities.add(new Entry(counter, sleepScoreSamples.get(0).getSleepScore()));
|
||||
if (!sleepScoreSamples.isEmpty() && sleepScoreSamples.get(sleepScoreSamples.size() -1).getSleepScore() > 0) {
|
||||
sleepScoreEntities.add(new Entry(counter, sleepScoreSamples.get(sleepScoreSamples.size() -1).getSleepScore()));
|
||||
} else {
|
||||
if (!sleepScoreEntities.isEmpty()) {
|
||||
List<Entry> clone = new ArrayList<>(sleepScoreEntities.size());
|
||||
|
||||
Reference in New Issue
Block a user