| summaryrefslogtreecommitdiff |
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2018-09-27 15:40:30 +0200 |
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2018-09-27 15:40:30 +0200 |
| commit | 2f22e667fbea56884d74ed27777f2e9f3fc9fd53 (patch) | |
| tree | 75300c58cc7b287993887f84b2d68b9d515a9ec0 /src/ElmModule/Update.elm | |
| parent | 486ee1dbe21be962e89f421e1dd5f3cbb2fd2177 (diff) | |
Starting to separate background and popup code.
Diffstat (limited to 'src/ElmModule/Update.elm')
| -rw-r--r-- | src/ElmModule/Update.elm | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/ElmModule/Update.elm b/src/ElmModule/Update.elm deleted file mode 100644 index 9e162fe..0000000 --- a/src/ElmModule/Update.elm +++ /dev/null @@ -1,51 +0,0 @@ -module ElmModule.Update exposing (update) - --- Elm ------------------------------------------------------------------------- - --- Main Menu ------------------------------------------------------------------- -import Struct.Event -import Struct.Model - -import Update.AddPlayer -import Update.HandleServerReply -import Update.RefreshBattles -import Update.StoreParams - --------------------------------------------------------------------------------- --- LOCAL ----------------------------------------------------------------------- --------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- EXPORTED -------------------------------------------------------------------- --------------------------------------------------------------------------------- -update : ( - Struct.Event.Type -> - Struct.Model.Type -> - (Struct.Model.Type, (Cmd Struct.Event.Type)) - ) -update event model = - let - new_model = (Struct.Model.clear_error model) - in - case event of - Struct.Event.None -> (model, Cmd.none) - - (Struct.Event.SetUsername str) -> (model, Cmd.none) - (Struct.Event.SetID str) -> (model, Cmd.none) - (Struct.Event.SetURLPrefix str) -> (model, Cmd.none) - (Struct.Event.SetFrequency val) -> (model, Cmd.none) - - Struct.Event.ShouldRefresh -> (Update.RefreshBattles.apply_to model) - - Struct.Event.StoreParams -> (Update.StoreParams.apply_to model) - - Struct.Event.AddPlayer -> (Update.AddPlayer.apply_to model) - - (Struct.Event.Failed err) -> - ( - (Struct.Model.invalidate err new_model), - Cmd.none - ) - - (Struct.Event.ServerReplied result) -> - (Update.HandleServerReply.apply_to model result) |


