diff options
author | Joris Guyonvarch | 2015-03-16 21:59:06 +0100 |
---|---|---|
committer | Joris Guyonvarch | 2015-03-16 21:59:06 +0100 |
commit | 8060fc370a8e16c7f39b1f63c6dc9127073eb5fe (patch) | |
tree | a1d049b1cd5afc55c12897a33b0ed7fddaa0e7dc /src/Model | |
parent | 36cb1d0392f4d32a4eed50ef2cc098dc90bb44e1 (diff) |
Updating design
Diffstat (limited to 'src/Model')
-rw-r--r-- | src/Model/IdGenerator.elm | 2 | ||||
-rw-r--r-- | src/Model/Model.elm | 5 | ||||
-rw-r--r-- | src/Model/Timer.elm | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/src/Model/IdGenerator.elm b/src/Model/IdGenerator.elm index 8bce44f..ba760d8 100644 --- a/src/Model/IdGenerator.elm +++ b/src/Model/IdGenerator.elm @@ -11,7 +11,7 @@ type alias IdGenerator = } initialIdGenerator = - { counter = 0 + { counter = 1 } getId : IdGenerator -> (Id, IdGenerator) diff --git a/src/Model/Model.elm b/src/Model/Model.elm index a3b4780..9a20219 100644 --- a/src/Model/Model.elm +++ b/src/Model/Model.elm @@ -14,7 +14,6 @@ import Model.IdGenerator (..) type alias Model = { currentTime : Time - , newTimerName : String , timers : Dict Id Timer , timerIdGenerator : IdGenerator } @@ -22,9 +21,9 @@ type alias Model = initialModel : Time -> Model initialModel initialTime = let (id, idGenerator) = getId initialIdGenerator + timerName = "Timer " ++ (toString id) in { currentTime = initialTime - , newTimerName = "" - , timers = Dict.insert id (initialTimer initialTime "Timer") Dict.empty + , timers = Dict.insert id (initialTimer initialTime timerName) Dict.empty , timerIdGenerator = idGenerator } diff --git a/src/Model/Timer.elm b/src/Model/Timer.elm index bfb734d..754a62a 100644 --- a/src/Model/Timer.elm +++ b/src/Model/Timer.elm @@ -23,7 +23,7 @@ initialTimer creationTime name = , name = name , initialTime = initialTime , currentTime = initTime initialTime - , isRunning = True + , isRunning = False } substractTimerTime : Time -> Timer -> Timer |