From 4e5f27a5b1428b9ad190a87a6bf0d4fe187387c9 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Mon, 16 Mar 2015 20:37:44 +0100 Subject: Adding a remove button to delete a timer --- src/Update/Update.elm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Update') diff --git a/src/Update/Update.elm b/src/Update/Update.elm index 0252fc8..635e29d 100644 --- a/src/Update/Update.elm +++ b/src/Update/Update.elm @@ -22,6 +22,7 @@ type Action = | AddNewTimer | DeltaTime Time | UpdateTimer Id TimerAction + | RemoveTimer Id updates : Signal.Channel Action updates = Signal.channel NoOp @@ -46,3 +47,5 @@ update action model = } UpdateTimer id action -> { model | timers <- Dict.update id (Maybe.map (updateTimer action)) model.timers } + RemoveTimer id -> + { model | timers <- Dict.remove id model.timers } -- cgit v1.2.3