Skip to content

fix: lobby UI unblocking before it should [MTT-4579] #748

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Assets/Scripts/Gameplay/UI/Lobby/LobbyUIMediator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,18 @@ public async void QueryLobbiesRequest(bool blockUI)

bool playerIsAuthorized = await m_AuthenticationServiceFacade.EnsurePlayerIsAuthorized();

if (!playerIsAuthorized)
if (blockUI && !playerIsAuthorized)
{
UnblockUIAfterLoadingIsComplete();
return;
}

await m_LobbyServiceFacade.RetrieveAndPublishLobbyListAsync();
UnblockUIAfterLoadingIsComplete();

if (blockUI)
{
UnblockUIAfterLoadingIsComplete();
}
}

public async void JoinLobbyWithCodeRequest(string lobbyCode)
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
* Better instructions for host listen IP. (#738) Most useful cases are usually 127.0.0.1 and 0.0.0.0.
* Tank's shield charge animation not getting stuck due to multiple invocations. (#742)
* Lobby join button not interactable if no join code is provided. (#744) This prevents an ArgumentNullException happening when we try to join a Lobby with an empty join code.
* Lobby UI unblocking before it should. (#748) This makes sure that we are not unblocking the UI while we are in the middle of the connection process, to prevent users from starting a second one at the same time. Now the UI stays blocked until the connection either succeeds of fails.

## [v1.3.0-pre] - 2022-06-23

Expand Down