休息页精简与圆圈标签统一;完成记录独立落库并隔离暂停备注

This commit is contained in:
XIGE
2026-11-28 14:00:53 +08:00
parent 76449e6258
commit fd489a9f5f
9 changed files with 153 additions and 66 deletions

View File

@@ -161,6 +161,12 @@ class TasksFragment : Fragment(R.layout.fragment_tasks) {
/** 11月27日 周五 09:12:03-09:37:03 */
private fun doneRange(task: Task, spans: Map<Long, SessionSpan>): String? {
// 每次专注单独成一条完成记录:起止与秒数存在这条记录上,不再靠 session 回查
if (task.logSeconds > 0 && task.originId > 0 && task.doneAt > task.createdAt) {
val range = "${Dates.dateWithWeek(task.createdAt)} " +
"${Dates.hms(task.createdAt)}-${Dates.hms(task.doneAt)}"
return "$range · 专注${Dates.duration(task.logSeconds)}"
}
val span = spans[task.id]
if (span != null) {
val range = "${Dates.dateWithWeek(span.startAt)} " +