任务完成后从列表消失;重要度改名并新增紧急度五角星;通知按钮间距与默认专注页

This commit is contained in:
XIGE
2026-11-28 17:11:28 +08:00
parent 6d13a5bf3c
commit 6b68d56467
13 changed files with 176 additions and 58 deletions

View File

@@ -112,6 +112,10 @@ class MainActivity : AppCompatActivity() {
// 进程常驻时跨天不会重走 App.onCreate,回到前台再滚一次重复任务。
// 放在 super 之前:片段 onResume 里的 reload 读到的就是推进后的日期。
runCatching { Store.rollRepeatingTasks() }
// 打开/回到前台默认停在专注页;休息正在计时时不打断
if (!TimerCore.running && TimerCore.mode != TimerCore.MODE_FOCUS) {
runCatching { TimerCore.setMode(TimerCore.MODE_FOCUS) }
}
super.onResume()
rollHandler.removeCallbacks(rollRunner)
rollHandler.postDelayed(rollRunner, 60_000L)