From 8060fc370a8e16c7f39b1f63c6dc9127073eb5fe Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Mon, 16 Mar 2015 21:59:06 +0100 Subject: Updating design --- src/Update/Update.elm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/Update/Update.elm') 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 -- cgit v1.2.3