Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
OGS provides live player stats for the automatch queue via /termination-api/automatch-stats.
This PR uses it to populate
AutomatchPresets.playerCount(sort of).Discussion neededResolved!GameClient.automatchPresetsis a synchronous API. Therefore,playerCountis not available when the list is requested by ServerLobbyPage.There are two potential fixes:
GameClient.automatchPresetsreturn aFutureso that we can make network requests.ValueNotifier.I need help deciding how to resolve as this would affect the other clients (probably in a good way)
Testing
Note: because of the login/sync/caching issue, this only works if you navigate to another screen (e.g. game record page) and return to the lobby page after the cache has been set.