summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2018-09-28 17:32:11 +0200
committernsensfel <SpamShield0@noot-noot.org>2018-09-28 17:32:11 +0200
commit0f0d16d980896f557d53b064d05dbb4a8feceec6 (patch)
tree3bfafa5bd70541bfc767d46a04c02740477a8d81
parentfc06ceae1de311f3aa6383fc9c37f87506005459 (diff)
downloadtacticians-extension-0f0d16d980896f557d53b064d05dbb4a8feceec6.zip
tacticians-extension-0f0d16d980896f557d53b064d05dbb4a8feceec6.tar.bz2
...
-rw-r--r--src/background/elm-package.json1
-rw-r--r--src/background/src/ElmModule/Init.elm9
-rw-r--r--src/background/src/ElmModule/Subscriptions.elm12
3 files changed, 12 insertions, 10 deletions
diff --git a/src/background/elm-package.json b/src/background/elm-package.json
index 14dedf1..ba47ace 100644
--- a/src/background/elm-package.json
+++ b/src/background/elm-package.json
@@ -10,7 +10,6 @@
"exposed-modules": [],
"dependencies": {
"NoRedInk/elm-decode-pipeline": "3.0.0 <= v < 4.0.0",
- "andrewMacmurray/elm-delay": "2.0.3 <= v < 3.0.0",
"elm-lang/core": "5.1.1 <= v < 6.0.0",
"elm-lang/dom": "1.1.1 <= v < 2.0.0",
"elm-lang/html": "2.0.0 <= v < 3.0.0",
diff --git a/src/background/src/ElmModule/Init.elm b/src/background/src/ElmModule/Init.elm
index 65d31b7..350a070 100644
--- a/src/background/src/ElmModule/Init.elm
+++ b/src/background/src/ElmModule/Init.elm
@@ -1,9 +1,6 @@
module ElmModule.Init exposing (init)
-- Elm -------------------------------------------------------------------------
-import Delay
-
-import Time
-- Extension -------------------------------------------------------------------
import Struct.Event
@@ -21,9 +18,5 @@ init : Struct.Flags.Type -> (Struct.Model.Type, (Cmd Struct.Event.Type))
init flags =
(
(Struct.Model.new flags),
- (Delay.after
- (toFloat (Struct.Flags.get_frequency flags))
- (Time.minute)
- Struct.Event.ShouldRefresh
- )
+ Cmd.none
)
diff --git a/src/background/src/ElmModule/Subscriptions.elm b/src/background/src/ElmModule/Subscriptions.elm
index 77ca1ad..922b6a3 100644
--- a/src/background/src/ElmModule/Subscriptions.elm
+++ b/src/background/src/ElmModule/Subscriptions.elm
@@ -1,12 +1,14 @@
module ElmModule.Subscriptions exposing (..)
-- Elm -------------------------------------------------------------------------
+import Time
-- Extension -------------------------------------------------------------------
import Action.Ports
import Struct.Model
import Struct.Event
+import Struct.Flags
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
@@ -17,4 +19,12 @@ import Struct.Event
--------------------------------------------------------------------------------
subscriptions : Struct.Model.Type -> (Sub Struct.Event.Type)
subscriptions model =
- (Action.Ports.params_in (\s -> (Struct.Event.ReadParams s)))
+ (Sub.batch
+ [
+ (Action.Ports.params_in (\s -> (Struct.Event.ReadParams s))),
+ (Time.every
+ ((toFloat (Struct.Flags.get_frequency model.flags)) * Time.minute)
+ (\e -> (Struct.Event.ShouldRefresh))
+ )
+ ]
+ )