mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-24 00:27:33 +01:00
Xiaomi: Fix sleep samples when sleep stages are not found
We can at least show light sleep now.
This commit is contained in:
parent
dd952e335f
commit
ab41adbc7f
@ -220,6 +220,11 @@ public class SleepDetailsParser extends XiaomiActivityParser {
|
||||
stagesParseFailed = true;
|
||||
}
|
||||
|
||||
if (summaries.isEmpty()) {
|
||||
// We did not manage to find sleep stage samples - ensure we at least persist the base one
|
||||
summaries.add(sample);
|
||||
}
|
||||
|
||||
// save all the samples that we got
|
||||
try (DBHandler handler = GBApplication.acquireDB()) {
|
||||
final DaoSession session = handler.getDaoSession();
|
||||
|
Loading…
x
Reference in New Issue
Block a user