Closed FinOCE closed 1 week ago
Host transfer does not appear to be working correctly, and player lists are not being updated when players join/leave due to the change from lobby user IDS -> player models. Need to listen for USER_JOIN
and USER_LEAVE
events. Appears USER_LEAVE
is actually implemented in useLobbyData
but USER_JOIN
is not yet, and these should probably be moved to a new data source hook anyway.
useScores
, useMembers
, and useWins
are all also broken as a result. The types need to be updated and the User
type should be renamed to Player
.
Lobby update events now should fire when players join and leave, no need for bigger USER_JOIN
and USER_LEAVE
changes. Looking at the code, host changing should work as intended now, though I don't see why it wouldn't have been working previously.
When a player leaves a lobby it isn't updating the list. Also would be worth double checking the other older comments here to make sure they're still properly fixed
Host exchange seems to be working now. However, it appears likely that when a player rejoins it doesnt update from inactive to active. Player A creates, player B joins, player A leaves, player A rejoins. Then player B leaves and it goes through as if no active players remain. Fix this and the player list not correctly updating on user leave and then this PR should be able to be merged. Its possible the app gets the full player list and just isnt filtering based on active/inactive...
Still to be tested, if fixes are necessary they can be added to the PR