aboutsummaryrefslogtreecommitdiff
path: root/src/Update/Update.elm
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-03-16 20:37:44 +0100
committerJoris Guyonvarch2015-03-16 20:37:44 +0100
commit4e5f27a5b1428b9ad190a87a6bf0d4fe187387c9 (patch)
tree726182399610921064223cd0dd2b868a9ca710f8 /src/Update/Update.elm
parentcd3b37adebca99138fad1acca37908183036ace9 (diff)
Adding a remove button to delete a timer
Diffstat (limited to 'src/Update/Update.elm')
-rw-r--r--src/Update/Update.elm3
1 files changed, 3 insertions, 0 deletions
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 }