From 2613aeeae0f4de44842ff0e796603d0316a61a14 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Wed, 18 Mar 2015 00:32:17 +0100 Subject: Can edit the time, unfortunately the enter key is overriden so the '+' key of the numpad is used instead --- src/Update/UpdateTimerEdition.elm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/Update/UpdateTimerEdition.elm (limited to 'src/Update/UpdateTimerEdition.elm') diff --git a/src/Update/UpdateTimerEdition.elm b/src/Update/UpdateTimerEdition.elm new file mode 100644 index 0000000..da12ed0 --- /dev/null +++ b/src/Update/UpdateTimerEdition.elm @@ -0,0 +1,20 @@ +module Update.UpdateTimerEdition + ( updateTimerEdition + ) where + +import Char (..) +import Debug + +import Model.TimerEdition (..) + +updateTimerEdition : Maybe Char -> TimerEdition -> TimerEdition +updateTimerEdition maybeChar timerEdition = + case maybeChar of + Just char -> + if isDigit char + then + { timerEdition | numbers <- char :: timerEdition.numbers } + else + timerEdition + Nothing -> + timerEdition -- cgit v1.2.3