HomeWildfire Games

JS lobby cleanup, fixes and lobby bot performance improvements:

Description

JS lobby cleanup, fixes and lobby bot performance improvements:

Do not send a wasteful rating request if the same player is selected again when someone joined the lobby, when changing the sorting order or when clicking on the same user again
by moving the player-selection change test from updatePlayerList to onPlayerListSelection.

That test should have been done here in rP17924 already and fixes #3840 well enough.

This change also fixes an unintentional behavior of the code, where the game the currently selected player is playing in would be selected if someone else joined the lobby, even if a different game was selected manually.
Furthermore it allows simplification of the code of rP19287 by removing selectGameFromPlayername which did almost the same as selectGameFromPlayername.

To still select the game the current player is playing in if the selected player didn't change, subscribe to the (new) event that is called when clicking on an item.

Differential Revision: https://code.wildfiregames.com/D688
Reviewed By: ffffffff (fpre)