mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix friendlist update conchain not working with optional argument
The clan argument is optional when using `add_friend` and `remove_friend`.
This commit is contained in:
parent
f3eaa10d7a
commit
84e3c081b4
|
@ -1728,7 +1728,7 @@ void CMenus::RenderServerbrowser(CUIRect MainView)
|
|||
void CMenus::ConchainFriendlistUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
|
||||
{
|
||||
pfnCallback(pResult, pCallbackUserData);
|
||||
if(pResult->NumArguments() == 2 && ((CMenus *)pUserData)->Client()->State() == IClient::STATE_OFFLINE)
|
||||
if(pResult->NumArguments() >= 1 && ((CMenus *)pUserData)->Client()->State() == IClient::STATE_OFFLINE)
|
||||
{
|
||||
((CMenus *)pUserData)->FriendlistOnUpdate();
|
||||
((CMenus *)pUserData)->Client()->ServerBrowserUpdate();
|
||||
|
@ -1738,6 +1738,6 @@ void CMenus::ConchainFriendlistUpdate(IConsole::IResult *pResult, void *pUserDat
|
|||
void CMenus::ConchainServerbrowserUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
|
||||
{
|
||||
pfnCallback(pResult, pCallbackUserData);
|
||||
if(pResult->NumArguments() && g_Config.m_UiPage == PAGE_FAVORITES)
|
||||
if(pResult->NumArguments() >= 1 && g_Config.m_UiPage == PAGE_FAVORITES)
|
||||
((CMenus *)pUserData)->ServerBrowser()->Refresh(IServerBrowser::TYPE_FAVORITES);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue