Add: [Network] Keep the refresh button in lowered state while refreshing (#9600)
This gives user visual feedback that the refresh is still pending, and prevents people from clicking again and again thinking nothing is happening. This is especially true for connections that fall back to TURN, as that takes a few seconds to kick in. Additionally, prevent clicking on the button again while a refresh is pending. This is only delaying a successful result.
This commit is contained in:
@@ -79,6 +79,7 @@ NetworkRecvStatus QueryNetworkGameSocketHandler::Receive_SERVER_FULL(Packet *p)
|
||||
{
|
||||
NetworkGameList *item = NetworkGameListAddItem(this->connection_string);
|
||||
item->status = NGLS_FULL;
|
||||
item->refreshing = false;
|
||||
|
||||
UpdateNetworkGameWindow();
|
||||
|
||||
@@ -89,6 +90,7 @@ NetworkRecvStatus QueryNetworkGameSocketHandler::Receive_SERVER_BANNED(Packet *p
|
||||
{
|
||||
NetworkGameList *item = NetworkGameListAddItem(this->connection_string);
|
||||
item->status = NGLS_BANNED;
|
||||
item->refreshing = false;
|
||||
|
||||
UpdateNetworkGameWindow();
|
||||
|
||||
@@ -107,6 +109,7 @@ NetworkRecvStatus QueryNetworkGameSocketHandler::Receive_SERVER_GAME_INFO(Packet
|
||||
CheckGameCompatibility(item->info);
|
||||
/* Ensure we consider the server online. */
|
||||
item->status = NGLS_ONLINE;
|
||||
item->refreshing = false;
|
||||
|
||||
UpdateNetworkGameWindow();
|
||||
|
||||
@@ -128,6 +131,7 @@ NetworkRecvStatus QueryNetworkGameSocketHandler::Receive_SERVER_ERROR(Packet *p)
|
||||
} else {
|
||||
item->status = NGLS_OFFLINE;
|
||||
}
|
||||
item->refreshing = false;
|
||||
|
||||
UpdateNetworkGameWindow();
|
||||
|
||||
|
Reference in New Issue
Block a user