Commit 4515982819265640bea613eb87db225b02a9815e

Authored by 常守达
1 parent e969282f

fix(today):睡眠卡片默认8小时目标

... ... @@ -33,11 +33,11 @@ class TodaySleepCard extends StatelessWidget {
? '-'
: '${healthData?.hrAvg}';
double sleepDurationProgress =
(activityTarget?.sleepTargetDuration ?? 0) == 0 ||
(activityTarget?.sleepTargetDuration ?? 28800) == 0 ||
sleepDuration == 0
? -1
: ((healthData?.sleepDuration ?? 0) /
(activityTarget?.sleepTargetDuration ?? 0) *
(activityTarget?.sleepTargetDuration ?? 28800) *
360);
double sleepScoreProgress =
sleepDuration == 0 ? -1 : (healthData?.sleepScore ?? 0.0) * 3.6;
... ...