diff options
Diffstat (limited to 'src/Update/UpdateTimer.elm')
-rw-r--r-- | src/Update/UpdateTimer.elm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Update/UpdateTimer.elm b/src/Update/UpdateTimer.elm index d8861b7..40085ed 100644 --- a/src/Update/UpdateTimer.elm +++ b/src/Update/UpdateTimer.elm @@ -8,9 +8,15 @@ import Model.Id (..) type TimerAction = ToggleRunning + | Stop updateTimer : TimerAction -> Timer -> Timer updateTimer action timer = case action of ToggleRunning -> { timer | isRunning <- not timer.isRunning } + Stop -> + { timer + | isRunning <- False + , currentTime <- timer.initialTime + } |