puts group chest almost back up
This commit is contained in:
@@ -300,8 +300,23 @@ update msg model =
|
||||
( Player (PlayerConfig session (Add Chest.initCreate)), Cmd.none )
|
||||
|
||||
IntoView ->
|
||||
-- TODO: add the necessary test on group/player
|
||||
( Player (PlayerConfig session (PlayerChest Chest.init)), Cmd.none )
|
||||
let
|
||||
userChest =
|
||||
case Session.user session of
|
||||
Session.Player player _ _ ->
|
||||
if player.id == 0 then
|
||||
GroupChest
|
||||
|
||||
else
|
||||
PlayerChest
|
||||
|
||||
-- TODO: this seems not right
|
||||
-- there should be a better way
|
||||
-- to handle this
|
||||
_ ->
|
||||
PlayerChest
|
||||
in
|
||||
( Player (PlayerConfig session (userChest Chest.init)), Cmd.none )
|
||||
|
||||
_ ->
|
||||
( model, Cmd.none )
|
||||
|
||||
Reference in New Issue
Block a user