Skip to content

Commit 1f1098d

Browse files
committed
fix stats detail showing absolute averages for goals and tags
1 parent fc0ed85 commit 1f1098d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

features/feature_statistics_detail/src/main/java/com/example/util/simpletimetracker/feature_statistics_detail/mapper/StatisticsDetailViewDataMapper.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -493,9 +493,9 @@ class StatisticsDetailViewDataMapper @Inject constructor(
493493
val abs = abs(value)
494494
return when {
495495
abs >= 1000f -> value.toLong().toString()
496-
abs >= 100f -> String.format("%.1f", abs)
497-
abs >= 10f -> String.format("%.2f", abs)
498-
else -> String.format("%.3f", abs)
496+
abs >= 100f -> String.format("%.1f", value)
497+
abs >= 10f -> String.format("%.2f", value)
498+
else -> String.format("%.3f", value)
499499
}.toString().removeTrailingZeroes()
500500
}
501501

0 commit comments

Comments
 (0)