Skip to content

Commit 20294c2

Browse files
fix: lobby UI unblocking before it should [MTT-4579] (#748)
* preventing unblocking of UI during periodic lobby query
1 parent 5f1bccc commit 20294c2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Assets/Scripts/Gameplay/UI/Lobby/LobbyUIMediator.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,18 @@ public async void QueryLobbiesRequest(bool blockUI)
119119

120120
bool playerIsAuthorized = await m_AuthenticationServiceFacade.EnsurePlayerIsAuthorized();
121121

122-
if (!playerIsAuthorized)
122+
if (blockUI && !playerIsAuthorized)
123123
{
124124
UnblockUIAfterLoadingIsComplete();
125125
return;
126126
}
127127

128128
await m_LobbyServiceFacade.RetrieveAndPublishLobbyListAsync();
129-
UnblockUIAfterLoadingIsComplete();
129+
130+
if (blockUI)
131+
{
132+
UnblockUIAfterLoadingIsComplete();
133+
}
130134
}
131135

132136
public async void JoinLobbyWithCodeRequest(string lobbyCode)

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
5151
* Better instructions for host listen IP. (#738) Most useful cases are usually 127.0.0.1 and 0.0.0.0.
5252
* Tank's shield charge animation not getting stuck due to multiple invocations. (#742)
5353
* 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.
54+
* 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.
5455

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

0 commit comments

Comments
 (0)