diff options
author | Joris Guyonvarch | 2015-03-16 20:53:02 +0100 |
---|---|---|
committer | Joris Guyonvarch | 2015-03-16 20:53:02 +0100 |
commit | afb9308a106a5cc09271e4420ed16c56dcd73f98 (patch) | |
tree | 90de17be17af00030cb30016918a93d1e783ffae /src/Update | |
parent | 4e5f27a5b1428b9ad190a87a6bf0d4fe187387c9 (diff) |
Adding a stop button
Diffstat (limited to 'src/Update')
-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 + } |