fix visible server list refreshing
This commit is contained in:
parent
c99b6b058f
commit
413e26b2ae
@ -199,6 +199,11 @@ namespace Components
|
||||
}
|
||||
|
||||
void ServerList::RefreshVisibleList(UIScript::Token)
|
||||
{
|
||||
ServerList::RefreshVisibleListInternal(UIScript::Token());
|
||||
}
|
||||
|
||||
void ServerList::RefreshVisibleListInternal(UIScript::Token, bool refresh)
|
||||
{
|
||||
Dvar::Var("ui_serverSelected").set(false);
|
||||
|
||||
@ -207,6 +212,12 @@ namespace Components
|
||||
auto list = ServerList::GetList();
|
||||
if (!list) return;
|
||||
|
||||
if (refresh)
|
||||
{
|
||||
ServerList::Refresh(UIScript::Token());
|
||||
return;
|
||||
}
|
||||
|
||||
bool ui_browserShowFull = Dvar::Var("ui_browserShowFull").get<bool>();
|
||||
bool ui_browserShowEmpty = Dvar::Var("ui_browserShowEmpty").get<bool>();
|
||||
int ui_browserShowHardcore = Dvar::Var("ui_browserKillcam").get<int>();
|
||||
@ -368,7 +379,7 @@ namespace Components
|
||||
auto list = ServerList::GetList();
|
||||
if (list) list->clear();
|
||||
|
||||
ServerList::RefreshVisibleList(UIScript::Token());
|
||||
ServerList::RefreshVisibleListInternal(UIScript::Token());
|
||||
|
||||
Game::ShowMessageBox("Server removed from favourites.", "Success");
|
||||
}
|
||||
@ -530,7 +541,7 @@ namespace Components
|
||||
if (lList)
|
||||
{
|
||||
lList->push_back(server);
|
||||
ServerList::RefreshVisibleList(UIScript::Token());
|
||||
ServerList::RefreshVisibleListInternal(UIScript::Token());
|
||||
}
|
||||
}
|
||||
|
||||
@ -693,7 +704,7 @@ namespace Components
|
||||
|
||||
netSource.set(source);
|
||||
|
||||
ServerList::RefreshVisibleList(UIScript::Token());
|
||||
ServerList::RefreshVisibleListInternal(UIScript::Token(), true);
|
||||
}
|
||||
|
||||
void ServerList::UpdateGameType()
|
||||
@ -709,7 +720,7 @@ namespace Components
|
||||
|
||||
joinGametype.set(gametype);
|
||||
|
||||
ServerList::RefreshVisibleList(UIScript::Token());
|
||||
ServerList::RefreshVisibleListInternal(UIScript::Token());
|
||||
}
|
||||
|
||||
void ServerList::UpdateVisibleInfo()
|
||||
|
@ -35,6 +35,7 @@ namespace Components
|
||||
|
||||
static void Refresh(UIScript::Token);
|
||||
static void RefreshVisibleList(UIScript::Token);
|
||||
static void RefreshVisibleListInternal(UIScript::Token, bool refresh = false);
|
||||
static void UpdateVisibleList(UIScript::Token);
|
||||
static void InsertRequest(Network::Address address);
|
||||
static void Insert(Network::Address address, Utils::InfoString info);
|
||||
|
Loading…
Reference in New Issue
Block a user