diff --git a/Assets/Scripts/Gameplay/UI/Lobby/LobbyUIMediator.cs b/Assets/Scripts/Gameplay/UI/Lobby/LobbyUIMediator.cs index 42e6933d6..c74262708 100644 --- a/Assets/Scripts/Gameplay/UI/Lobby/LobbyUIMediator.cs +++ b/Assets/Scripts/Gameplay/UI/Lobby/LobbyUIMediator.cs @@ -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) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70b5817ab..412610f54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,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