diff options
author | Joris Guyonvarch | 2015-03-16 21:59:06 +0100 |
---|---|---|
committer | Joris Guyonvarch | 2015-03-16 21:59:06 +0100 |
commit | 8060fc370a8e16c7f39b1f63c6dc9127073eb5fe (patch) | |
tree | a1d049b1cd5afc55c12897a33b0ed7fddaa0e7dc /src/Update | |
parent | 36cb1d0392f4d32a4eed50ef2cc098dc90bb44e1 (diff) |
Updating design
Diffstat (limited to 'src/Update')
-rw-r--r-- | src/Update/Update.elm | 7 |
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 |