#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 |     val repeats: Int | ||||||
| ) : FunctionalTimer(studyTime) { | ) : FunctionalTimer(studyTime) { | ||||||
| 
 | 
 | ||||||
|     var breaksRemaining = repeats |     var breaksRemaining = repeats - 1 | ||||||
|     var isInBreak = false |     var isInBreak = false | ||||||
| 
 | 
 | ||||||
|     override fun tick() { |     override fun tick() { | ||||||
|         if (hasEnded()) { |         if (hasEnded()) { | ||||||
|             return |             return | ||||||
|         } |         } | ||||||
| 
 |  | ||||||
|         if (hasCurrentCountdownEnded()) { |         if (hasCurrentCountdownEnded()) { | ||||||
|             if (isInBreak) { |             if (isInBreak) { | ||||||
|                 breaksRemaining-- |                 breaksRemaining-- | ||||||
|  |  | ||||||
		Reference in a new issue
	
	 brreynie
						brreynie