aboutsummaryrefslogtreecommitdiff
path: root/src/Model
diff options
context:
space:
mode:
Diffstat (limited to 'src/Model')
-rw-r--r--src/Model/Model.elm11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Model/Model.elm b/src/Model/Model.elm
index fa97d7b..a3b4780 100644
--- a/src/Model/Model.elm
+++ b/src/Model/Model.elm
@@ -21,11 +21,12 @@ type alias Model =
initialModel : Time -> Model
initialModel initialTime =
- { currentTime = initialTime
- , newTimerName = ""
- , timers = Dict.empty
- , timerIdGenerator = initialIdGenerator
- }
+ let (id, idGenerator) = getId initialIdGenerator
+ in { currentTime = initialTime
+ , newTimerName = ""
+ , timers = Dict.insert id (initialTimer initialTime "Timer") Dict.empty
+ , timerIdGenerator = idGenerator
+ }
substractTimersTime : Time -> Dict Id Timer -> Dict Id Timer
substractTimersTime t timers =