Don't update news when something was only removed

This commit is contained in:
def 2020-09-03 12:32:13 +02:00
parent bf085c290b
commit d6f74eb654

View file

@ -2441,7 +2441,8 @@ void CClient::LoadDDNetInfo()
{ {
const char *pNewsString = json_string_get(pNews); const char *pNewsString = json_string_get(pNews);
if(m_aNews[0] && str_comp(m_aNews, pNewsString)) // Only switch to news page if something new was added to the news
if(m_aNews[0] && str_find(m_aNews, pNewsString) == nullptr)
g_Config.m_UiPage = CMenus::PAGE_NEWS; g_Config.m_UiPage = CMenus::PAGE_NEWS;
str_copy(m_aNews, pNewsString, sizeof(m_aNews)); str_copy(m_aNews, pNewsString, sizeof(m_aNews));