diff options
author | Joris Guyonvarch | 2015-03-18 00:32:17 +0100 |
---|---|---|
committer | Joris Guyonvarch | 2015-03-18 00:32:17 +0100 |
commit | 2613aeeae0f4de44842ff0e796603d0316a61a14 (patch) | |
tree | 722a21c69597e6d2547ad9f991e7c73afae78058 /src/Update/UpdateTimerEdition.elm | |
parent | 0075abf51db5d1b54117525d7a7f9b06e31c9484 (diff) |
Can edit the time, unfortunately the enter key is overriden so the '+' key of the numpad is used instead
Diffstat (limited to 'src/Update/UpdateTimerEdition.elm')
-rw-r--r-- | src/Update/UpdateTimerEdition.elm | 20 |
1 files changed, 20 insertions, 0 deletions
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 |