aboutsummaryrefslogtreecommitdiff
path: root/src/Update/Update.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/Update/Update.elm')
-rw-r--r--src/Update/Update.elm7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Update/Update.elm b/src/Update/Update.elm
index 635e29d..aa31a84 100644
--- a/src/Update/Update.elm
+++ b/src/Update/Update.elm
@@ -18,7 +18,6 @@ import Update.UpdateTimer (..)
type Action =
NoOp
- | RenameNewTimer String
| AddNewTimer
| DeltaTime Time
| UpdateTimer Id TimerAction
@@ -31,14 +30,12 @@ update : Action -> Model -> Model
update action model =
case action of
NoOp -> model
- RenameNewTimer name ->
- { model | newTimerName <- name }
AddNewTimer ->
let (id, newTimerIdGenerator) = getId model.timerIdGenerator
+ timerName = "Timer " ++ (toString id)
in { model
- | timers <- Dict.insert id (initialTimer model.currentTime model.newTimerName) model.timers
+ | timers <- Dict.insert id (initialTimer model.currentTime timerName) model.timers
, timerIdGenerator <- newTimerIdGenerator
- , newTimerName <- ""
}
DeltaTime delta ->
{ model