项目排序模式序号与置顶;横屏锁屏遮状态栏、排版对称化;版本 1.2

This commit is contained in:
XIGE
2026-11-29 14:20:09 +08:00
parent bc01e0ac67
commit fd674322a1
11 changed files with 140 additions and 42 deletions

View File

@@ -11,6 +11,10 @@ data class Project(
val doneTasks: Int,
val focusSeconds: Int,
val pomodoros: Int,
/** 排序序号:非置顶项目按它升序排,数字越小越靠前 */
val sortIndex: Int = 0,
/** 置顶时间戳:0 未置顶;置顶项目排最前,多个置顶按它倒序(越近越靠前) */
val pinnedAt: Long = 0,
) {
val totalTasks: Int get() = openTasks + doneTasks
val progress: Float get() = if (totalTasks == 0) 0f else doneTasks.toFloat() / totalTasks