| 1993 | } |
| 1994 | |
| 1995 | void CMenus::UpdateCommunityCache(bool Force) |
| 1996 | { |
| 1997 | if(g_Config.m_UiPage >= PAGE_FAVORITE_COMMUNITY_1 && g_Config.m_UiPage <= PAGE_FAVORITE_COMMUNITY_5 && |
| 1998 | (size_t)(g_Config.m_UiPage - PAGE_FAVORITE_COMMUNITY_1) >= ServerBrowser()->FavoriteCommunities().size()) |
| 1999 | { |
| 2000 | // Reset page to internet when there is no favorite community for this page, |
| 2001 | // i.e. when favorite community is removed via console while the page is open. |
| 2002 | // This also updates the community cache because the page is changed. |
| 2003 | SetMenuPage(PAGE_INTERNET); |
| 2004 | } |
| 2005 | else |
| 2006 | { |
| 2007 | ServerBrowser()->CommunityCache().Update(Force); |
| 2008 | } |
| 2009 | } |
no test coverage detected