mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 09:21:18 +02:00
update_settings.cpp: split statement for update settings notify
Avoid double action
This commit is contained in:
@@ -202,17 +202,19 @@ int CUpdateSettings::initMenu()
|
||||
|
||||
bool CUpdateSettings::changeNotify(const neutrino_locale_t OptionName, void * /* data */)
|
||||
{
|
||||
if (ARE_LOCALES_EQUAL(OptionName, LOCALE_FLASHUPDATE_AUTOCHECK) || ARE_LOCALES_EQUAL(OptionName, LOCALE_FLASHUPDATE_AUTOCHECK_PACKAGES))
|
||||
if (ARE_LOCALES_EQUAL(OptionName, LOCALE_FLASHUPDATE_AUTOCHECK))
|
||||
{
|
||||
CFlashUpdateCheck::getInstance()->stopThread();
|
||||
if (g_settings.softupdate_autocheck)
|
||||
CFlashUpdateCheck::getInstance()->startThread();
|
||||
}
|
||||
#if ENABLE_PKG_MANAGEMENT
|
||||
CUpdateCheckPackages::getInstance()->stopThread();
|
||||
if (ARE_LOCALES_EQUAL(OptionName, LOCALE_FLASHUPDATE_AUTOCHECK_PACKAGES))
|
||||
{
|
||||
CUpdateCheckPackages::getInstance()->stopTimer();
|
||||
if (g_settings.softupdate_autocheck_packages)
|
||||
CUpdateCheckPackages::getInstance()->startThread();
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user