fixes bug with notification timeout, adds player selection for group sell

This commit is contained in:
2019-12-07 21:51:39 +01:00
parent 903fdd816d
commit b0ac8846fc
3 changed files with 142 additions and 32 deletions

View File

@@ -272,18 +272,22 @@ type PageMsg
closeAction ( page, cmd ) =
case page of
Home from ->
gotoHome page
let
( newPage, pageCmd ) =
case page of
Home from ->
gotoHome page
GroupChest from ->
gotoGroupChest page
GroupChest from ->
gotoGroupChest page
Shop from ->
gotoShop page
Shop from ->
gotoShop page
_ ->
( page, cmd )
_ ->
( page, Cmd.none )
in
( newPage, Cmd.batch [ cmd, pageCmd ] )
update msg page =
@@ -342,6 +346,10 @@ update msg page =
)
( CloseNotification _, _, _ ) ->
let
_ =
Debug.log "lost close msg" 0
in
( page, Cmd.none )
-- Wealth viewer/editor
@@ -394,10 +402,10 @@ update msg page =
|> map (Session.updateUser updatedUser)
|> map (Session.updateNotifications ( result.notification, result.errors ))
, case result.notification of
Just _ ->
Process.sleep 5000.0
|> Task.andThen (\_ -> Task.succeed <| CloseNotification NotifySuccess)
|> Task.perform identity
Just n ->
Task.perform
(\_ -> CloseNotification NotifySuccess)
(Process.sleep 5000.0)
Nothing ->
Cmd.none