aboutsummaryrefslogtreecommitdiff
path: root/src/Update
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-03-16 22:19:06 +0100
committerJoris Guyonvarch2015-03-16 22:19:06 +0100
commite1f8664779b0075ad7da76e4290c1fe8f9b76b94 (patch)
treea77a661296dee9276c63a7d8f1609d0629018108 /src/Update
parent8060fc370a8e16c7f39b1f63c6dc9127073eb5fe (diff)
Adding a play / pause button
Diffstat (limited to 'src/Update')
-rw-r--r--src/Update/UpdateTimer.elm6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Update/UpdateTimer.elm b/src/Update/UpdateTimer.elm
index b3be088..3eba549 100644
--- a/src/Update/UpdateTimer.elm
+++ b/src/Update/UpdateTimer.elm
@@ -7,15 +7,15 @@ import Model.Timer (..)
import Model.Id (..)
type TimerAction =
- ToggleRunning
- | Restart
+ Restart
+ | ToggleRunning
| Stop
updateTimer : TimerAction -> Timer -> Timer
updateTimer action timer =
case action of
ToggleRunning ->
- { timer | isRunning <- not timer.isRunning }
+ { timer | isRunning <- timer.currentTime > 0.0 && not timer.isRunning }
Restart ->
{ timer
| isRunning <- True