Force refresh of server list when exiting from the server info screen.

This commit is contained in:
hiker
2015-12-01 17:47:03 +11:00
parent 642c402dcf
commit 76ddaeaef7
2 changed files with 4 additions and 1 deletions

View File

@@ -30,6 +30,7 @@
#include "network/protocol_manager.hpp"
#include "network/protocols/client_lobby_room_protocol.hpp"
#include "network/stk_host.hpp"
#include "states_screens/server_selection.hpp"
#include "states_screens/state_manager.hpp"
static const char ID_LOCKED[] = "locked/";
@@ -209,6 +210,7 @@ bool NetworkKartSelectionScreen::onEscapePressed()
{
// then remove the lobby screen (you left the server)
StateManager::get()->popMenu();
ServerSelection::getInstance()->refresh();
// notify the server that we left
ClientLobbyRoomProtocol* protocol = static_cast<ClientLobbyRoomProtocol*>(
ProtocolManager::getInstance()->getProtocol(PROTOCOL_LOBBY_ROOM));

View File

@@ -49,10 +49,11 @@ private:
/** A pointer to the http request for getting a server list. */
const Online::XMLRequest *m_refresh_request;
void refresh();
public:
void refresh();
/** Load the addons into the main list.*/
void loadList();