休息纯计时解耦滑动;重复任务按周期自动生成;统计数字去空格
This commit is contained in:
@@ -103,11 +103,11 @@ class StatsFragment : Fragment(R.layout.fragment_stats) {
|
||||
todayRing.ringColor = col(if (stat.goalProgress >= 1f) R.color.rest else R.color.brand)
|
||||
tvGoalPct.text = "${(stat.goalProgress * 100).toInt()}%"
|
||||
tvGoalHint.text = getString(R.string.goal_short, goal)
|
||||
tvTodayMinutes.text = "${stat.minutes} 分钟"
|
||||
tvTodayMinutes.text = "${stat.minutes}分钟"
|
||||
tvTodayPomo.text = "${stat.pomodoros}"
|
||||
tvTodayDone.text = "${stat.doneTasks}"
|
||||
val streak = Store.streak()
|
||||
tvStreak.text = "连续打卡 ${streak} 天 · 目标 ${goal} 分钟"
|
||||
tvStreak.text = "连续打卡${streak}天 · 目标${goal}分钟"
|
||||
}
|
||||
|
||||
private fun renderTrend() {
|
||||
@@ -119,7 +119,7 @@ class StatsFragment : Fragment(R.layout.fragment_stats) {
|
||||
tvTrendTotal.text = if (totalMinutes <= 0) {
|
||||
getString(R.string.no_data)
|
||||
} else {
|
||||
"共 ${Dates.duration(totalMinutes * 60)}"
|
||||
"共${Dates.duration(totalMinutes * 60)}"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ class StatsFragment : Fragment(R.layout.fragment_stats) {
|
||||
val series = Store.dailySeries(Dates.addDays(Dates.todayStart(), -83), 84)
|
||||
heatmap.setData(series)
|
||||
val activeDays = series.count { it.minutes > 0 }
|
||||
tvHeatHint.text = "近 12 周 · $activeDays 天有记录"
|
||||
tvHeatHint.text = "近12周 · ${activeDays}天有记录"
|
||||
}
|
||||
|
||||
private fun buildHeatLegend() {
|
||||
|
||||
Reference in New Issue
Block a user