mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix server browser update on community filter change via console
Also update server browser filtering/sorting when changing the community/country/type filter config variables with the console. Clean the filter config variables when they are changed instead of only when the community filter is rendered.
This commit is contained in:
parent
aba67f46ee
commit
ccc470ecc9
|
@ -688,8 +688,6 @@ void CMenus::RenderServerbrowserFilters(CUIRect View)
|
|||
// community filter
|
||||
if((g_Config.m_UiPage == PAGE_INTERNET || g_Config.m_UiPage == PAGE_FAVORITES) && !ServerBrowser()->Communities().empty())
|
||||
{
|
||||
ServerBrowser()->CleanFilters();
|
||||
|
||||
CUIRect Row;
|
||||
View.HSplitTop(6.0f, nullptr, &View);
|
||||
View.HSplitTop(19.0f, &Row, &View);
|
||||
|
@ -1742,8 +1740,13 @@ void CMenus::ConchainFavoritesUpdate(IConsole::IResult *pResult, void *pUserData
|
|||
void CMenus::ConchainCommunitiesUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
|
||||
{
|
||||
pfnCallback(pResult, pCallbackUserData);
|
||||
CMenus *pThis = static_cast<CMenus *>(pUserData);
|
||||
if(pResult->NumArguments() >= 1 && (g_Config.m_UiPage == PAGE_INTERNET || g_Config.m_UiPage == PAGE_FAVORITES))
|
||||
((CMenus *)pUserData)->UpdateCommunityCache(true);
|
||||
{
|
||||
pThis->ServerBrowser()->CleanFilters();
|
||||
pThis->UpdateCommunityCache(true);
|
||||
pThis->Client()->ServerBrowserUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
void CMenus::UpdateCommunityCache(bool Force)
|
||||
|
|
Loading…
Reference in a new issue