diff options
Diffstat (limited to 'src/Update')
-rw-r--r-- | src/Update/Update.elm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Update/Update.elm b/src/Update/Update.elm index aa31a84..fa11921 100644 --- a/src/Update/Update.elm +++ b/src/Update/Update.elm @@ -11,6 +11,7 @@ import Maybe import Model.Model (..) import Model.Timer (..) +import Model.TimerEdition (..) import Model.Id (..) import Model.IdGenerator (..) @@ -22,6 +23,8 @@ type Action = | DeltaTime Time | UpdateTimer Id TimerAction | RemoveTimer Id + | EditTimer Id + | ReadOnly updates : Signal.Channel Action updates = Signal.channel NoOp @@ -46,3 +49,7 @@ update action model = { model | timers <- Dict.update id (Maybe.map (updateTimer action)) model.timers } RemoveTimer id -> { model | timers <- Dict.remove id model.timers } + EditTimer id -> + { model | timerEdition <- Just (newTimerEdition id) } + ReadOnly -> + { model | timerEdition <- Nothing } |