#109 fix pomodorotimer doing too many cycles
This commit is contained in:
parent
93aae20f85
commit
d666733abe
1 changed files with 1 additions and 2 deletions
|
@ -6,14 +6,13 @@ class FunctionalPomodoroTimer(
|
|||
val repeats: Int
|
||||
) : FunctionalTimer(studyTime) {
|
||||
|
||||
var breaksRemaining = repeats
|
||||
var breaksRemaining = repeats - 1
|
||||
var isInBreak = false
|
||||
|
||||
override fun tick() {
|
||||
if (hasEnded()) {
|
||||
return
|
||||
}
|
||||
|
||||
if (hasCurrentCountdownEnded()) {
|
||||
if (isInBreak) {
|
||||
breaksRemaining--
|
||||
|
|
Reference in a new issue