moves Modes inside Chest module

This commit is contained in:
2019-12-04 22:03:29 +01:00
parent b97be8c321
commit b00d26e6d4
6 changed files with 115 additions and 206 deletions

View File

@@ -283,14 +283,14 @@ map func page =
closeAction ( page, cmd ) =
case page of
Home home ->
( page, cmd )
Home from ->
gotoHome page
GroupChest chest ->
( GroupChest (GroupChest.refresh chest), cmd )
GroupChest from ->
gotoGroupChest page
Shop shop ->
( page, cmd )
Shop from ->
gotoShop page
_ ->
( page, cmd )
@@ -302,6 +302,7 @@ update msg page =
-- Capture API messages
( GotHomeMsg (Home.Api apiMsg), Home home, _ ) ->
update (ApiMsg apiMsg) page
|> closeAction
-- Relay others
( GotHomeMsg subMsg, Home home, _ ) ->
@@ -326,6 +327,7 @@ update msg page =
-- Shop page
( GotShopMsg (Shop.Api apiMsg), Shop shop, _ ) ->
update (ApiMsg apiMsg) page
|> closeAction
( GotShopMsg subMsg, Shop shop, _ ) ->
Shop.update subMsg shop