From 2abb8ffa46cbe86deedb9ddcbb9b042b51285feb Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Sun, 22 Mar 2015 12:53:55 +0100 Subject: Editing name first draft --- src/Update/UpdateTimer.elm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Update/UpdateTimer.elm') diff --git a/src/Update/UpdateTimer.elm b/src/Update/UpdateTimer.elm index 2e0d9af..30603cd 100644 --- a/src/Update/UpdateTimer.elm +++ b/src/Update/UpdateTimer.elm @@ -10,7 +10,8 @@ import Model.TimerState (..) import Model.Id (..) type TimerAction = - Pause + Rename String + | Pause | ToggleRunning | Stop | SetTime Time @@ -19,6 +20,8 @@ type TimerAction = updateTimer : TimerAction -> Timer -> Timer updateTimer action timer = case action of + Rename name -> + { timer | name <- Just name } Pause -> { timer | state <- Idle } ToggleRunning -> -- cgit v1.2.3