修正长休提示与实际时长不一致
This commit is contained in:
@@ -478,7 +478,9 @@ object TimerCore {
|
||||
// 提示里要报的是"下一段"的真实时长:第四轮专注后应提示长休,而不是固定 5 分钟
|
||||
val nextMinutes = if (wasFocus) {
|
||||
val every = Prefs.longBreakEvery.coerceAtLeast(2)
|
||||
if ((round + 1) % every == 0) Prefs.longBreakMinutes else Prefs.shortBreakMinutes
|
||||
// 与 advanceFromFocus() 用同一个判定:第 4 轮完成后 round=4,实际进入长休,
|
||||
// 提示也必须报长休时长;不能拿 round+1 去算,否则第 3/4 轮的提示会说反。
|
||||
if (round > 0 && round % every == 0) Prefs.longBreakMinutes else Prefs.shortBreakMinutes
|
||||
} else Prefs.focusMinutes
|
||||
if (wasFocus) {
|
||||
advanceFromFocus()
|
||||
|
||||
Reference in New Issue
Block a user