From 819fa6537bde7dab9bccea402255e2b94cd59cea Mon Sep 17 00:00:00 2001 From: Benau Date: Mon, 12 Aug 2019 10:02:57 +0800 Subject: [PATCH] Correct active state for assets download when internet option changes --- src/states_screens/options/options_screen_general.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/states_screens/options/options_screen_general.cpp b/src/states_screens/options/options_screen_general.cpp index ee7a602e2..bb7eb767b 100644 --- a/src/states_screens/options/options_screen_general.cpp +++ b/src/states_screens/options/options_screen_general.cpp @@ -131,6 +131,8 @@ void OptionsScreenGeneral::init() if (UserConfigParams::m_internet_status != RequestManager::IPERM_ALLOWED || StateManager::get()->getGameState() == GUIEngine::INGAME_MENU) getWidget("assets_settings")->setActive(false); + else + getWidget("assets_settings")->setActive(true); #else getWidget("assets_settings")->setVisible(false); #endif @@ -194,11 +196,17 @@ void OptionsScreenGeneral::eventCallback(Widget* widget, const std::string& name stats->setState(UserConfigParams::m_hw_report_enable); chat->setActive(true); chat->setState(UserConfigParams::m_lobby_chat); +#ifdef MOBILE_STK + getWidget("assets_settings")->setActive(true); +#endif } else { chat->setActive(false); stats->setActive(false); +#ifdef MOBILE_STK + getWidget("assets_settings")->setActive(false); +#endif // Disable this, so that the user has to re-check this if // enabled later (for GDPR compliance).