Commit f585746936680a16ba8eb48f475a6762774c8f12

Authored by 常守达
1 parent b53ecdf8

fix(today):站立时长

... ... @@ -132,12 +132,8 @@ class TodayActivityCard extends StatelessWidget {
// stand 单位为秒,转换为小时+分钟
List<_MetricValueSpan> standSpans;
if (stand > 0 && (activityTarget?.stand ?? 0) > 0) {
final stHours = stand ~/ 3600;
final stMinutes = (stand % 3600) ~/ 60;
standSpans = [
if (stHours > 0) _MetricValueSpan('$stHours', '小时'),
if (stMinutes > 0 || stHours == 0)
_MetricValueSpan(stMinutes > 0 ? '$stMinutes' : '0', '分钟'),
_MetricValueSpan('$stand', '小时'),
];
} else {
standSpans = [_MetricValueSpan('--', '小时')];
... ...