Page MenuHomeWildfire Games

Unselect lobby game if the selected player isn't present in any game
AcceptedPublic

Authored by ffffffff on Aug 23 2017, 11:21 PM.

Details

Reviewers
elexis
Dunedan
Summary

When a game is not found, when you click a player, to show the game where he is in, its inconsisty if nothing happens like no game is selected where player is in but also the game that if its shown has not the player in, its inconsisty to not unselect the game that if its selected to state there is no game in the gamelist, that has the player in.

Can be confusing though.

Test Plan

necessity

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

ffffffff created this revision.Aug 23 2017, 11:21 PM
Dunedan accepted this revision.Dec 28 2017, 9:14 AM
Dunedan added a subscriber: Dunedan.

I tried it out and it works like a charm. A little, but a really nice improvement. ๐Ÿ‘

This revision is now accepted and ready to land.Dec 28 2017, 9:14 AM

It was done like this on purpose but ok to remove it if you prefer that.

elexis retitled this revision from Inconsisty player select lobby show game to Unselect lobby game if the selected player isn't present in any game.Dec 28 2017, 12:43 PM
elexis added inline comments.Apr 20 2018, 5:03 PM
binaries/data/mods/public/gui/lobby/lobby.js
692

no else after break or return

693

Do I see this correctly that foundAsObserver can be deleted and the last if-statement removed, the return kept and a break added after the end because a player can't occur twice in a stringifiedTeamList?

ffffffff added inline comments.Apr 20 2018, 6:01 PM
binaries/data/mods/public/gui/lobby/lobby.js
693

come online

bb added a subscriber: bb.May 31 2019, 12:54 AM
bb added inline comments.
binaries/data/mods/public/gui/lobby/lobby.js
693

What the code seems to want to achieve is find one of the following in this order:

  • a game the player is playing in
  • a game a player is spectating
  • a game a player is Offline

So during the loop we need to know whether the current value can be overwritten by an "Offline" game, so we need to have some identifier I suppose. However the return should indeed be kept and the break got to be added.