diff options
author | Joris Guyonvarch | 2015-03-16 21:00:52 +0100 |
---|---|---|
committer | Joris Guyonvarch | 2015-03-16 21:00:52 +0100 |
commit | 1cfd5e02bbd92f54a6b888d475f9f3002f3763bb (patch) | |
tree | e1be7e520bf7ba1514912410983bd66bfd813822 /src/Update | |
parent | afb9308a106a5cc09271e4420ed16c56dcd73f98 (diff) |
Adding a restart button
Diffstat (limited to 'src/Update')
-rw-r--r-- | src/Update/UpdateTimer.elm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Update/UpdateTimer.elm b/src/Update/UpdateTimer.elm index 40085ed..771ef1c 100644 --- a/src/Update/UpdateTimer.elm +++ b/src/Update/UpdateTimer.elm @@ -8,6 +8,7 @@ import Model.Id (..) type TimerAction = ToggleRunning + | Restart | Stop updateTimer : TimerAction -> Timer -> Timer @@ -15,6 +16,10 @@ updateTimer action timer = case action of ToggleRunning -> { timer | isRunning <- not timer.isRunning } + Restart -> + { timer + | currentTime <- timer.initialTime + } Stop -> { timer | isRunning <- False |