fixes bug with notification timeout, adds player selection for group sell
This commit is contained in:
34
src/Page.elm
34
src/Page.elm
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user