diff options
author | William Carroll <wpcarro@gmail.com> | 2020-10-10T16·33+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-10-10T16·34+0100 |
commit | 487232d1aac6273ae911576a595b5c332c4ed0ca (patch) | |
tree | a931d41f22a653480fc1583f00cdf9ef55a51638 /scratch/habit-screens/client/src/Main.elm | |
parent | 7d425de48d395e2f81a62efccbcacc734572bb18 (diff) |
Ensure weekday is updated
This ensures us that our view is consistent within ~1 minute of reality.
Diffstat (limited to 'scratch/habit-screens/client/src/Main.elm')
-rw-r--r-- | scratch/habit-screens/client/src/Main.elm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scratch/habit-screens/client/src/Main.elm b/scratch/habit-screens/client/src/Main.elm index d2b36a33f322..2ddedb913357 100644 --- a/scratch/habit-screens/client/src/Main.elm +++ b/scratch/habit-screens/client/src/Main.elm @@ -4,11 +4,13 @@ import Browser import Habits import Html exposing (..) import State +import Time subscriptions : State.Model -> Sub State.Msg subscriptions model = - Sub.none + -- once per minute + Time.every (1000 * 60) (\_ -> State.MaybeAdjustWeekday) view : State.Model -> Html State.Msg |