Commit f585746936680a16ba8eb48f475a6762774c8f12

Authored by 常守达
1 parent b53ecdf8

fix(today):站立时长

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