From eb2b7fef41dafd28bd0502a8f48d89431a345ab3 Mon Sep 17 00:00:00 2001 From: Arjan Schrijver Date: Sun, 29 Sep 2024 22:17:11 +0200 Subject: [PATCH] Dashboard: Fix Today widget priority of AWAKE_SLEEP and NOT_MEASURED --- .../activities/dashboard/DashboardTodayWidget.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/dashboard/DashboardTodayWidget.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/dashboard/DashboardTodayWidget.java index 68e926a73..da8ffffe9 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/dashboard/DashboardTodayWidget.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/dashboard/DashboardTodayWidget.java @@ -378,7 +378,7 @@ public class DashboardTodayWidget extends AbstractDashboardWidget { activityKind == ActivityKind.LIGHT_SLEEP) activityTimestamps.put(i, activityKind); break; - case SLEEP_ANY: + case AWAKE_SLEEP: if (activityKind == ActivityKind.EXERCISE || activityKind == ActivityKind.ACTIVITY || activityKind == ActivityKind.DEEP_SLEEP || @@ -386,6 +386,16 @@ public class DashboardTodayWidget extends AbstractDashboardWidget { activityKind == ActivityKind.REM_SLEEP) activityTimestamps.put(i, activityKind); break; + case SLEEP_ANY: + case NOT_MEASURED: + if (activityKind == ActivityKind.EXERCISE || + activityKind == ActivityKind.ACTIVITY || + activityKind == ActivityKind.DEEP_SLEEP || + activityKind == ActivityKind.LIGHT_SLEEP || + activityKind == ActivityKind.REM_SLEEP || + activityKind == ActivityKind.AWAKE_SLEEP) + activityTimestamps.put(i, activityKind); + break; default: activityTimestamps.put(i, activityKind); break;