mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 10:58:26 +00:00
Store and load client settings
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
module Util.Update exposing
|
||||
( andThen1
|
||||
, andThen2
|
||||
, andThen3
|
||||
, cmdUnit
|
||||
)
|
||||
|
||||
@ -44,6 +45,21 @@ andThen2 fs m =
|
||||
|> combine
|
||||
|
||||
|
||||
andThen3 :
|
||||
List (model -> { x | model : model, cmd : Cmd msg, sub : Sub msg })
|
||||
-> model
|
||||
-> ( model, Cmd msg, Sub msg )
|
||||
andThen3 list m =
|
||||
let
|
||||
mkTuple r =
|
||||
( r.model, r.cmd, r.sub )
|
||||
|
||||
list2 =
|
||||
List.map (\e -> e >> mkTuple) list
|
||||
in
|
||||
andThen2 list2 m
|
||||
|
||||
|
||||
cmdUnit : a -> Cmd a
|
||||
cmdUnit a =
|
||||
Task.perform (\_ -> a) (Task.succeed ())
|
||||
|
Reference in New Issue
Block a user