update_settings.cpp: split statement for update settings notify

Avoid double action


Origin commit data
------------------
Branch: ni/coolstream
Commit: e553e427a9
Author: Thilo Graf <dbt@novatux.de>
Date: 2021-04-12 (Mon, 12 Apr 2021)



------------------
This commit was generated by Migit
This commit is contained in:
2021-04-12 23:02:51 +02:00
committed by vanhofen
parent 36d5994402
commit ad6fc49a69
2 changed files with 5 additions and 7 deletions

View File

@@ -199,20 +199,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
CUpdateCheck::getInstance()->stopTimer();
if (g_settings.softupdate_autocheck)
CUpdateCheck::getInstance()->startThread();
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;
}

View File

@@ -3150,7 +3150,6 @@ TIMER_STOP("################################## after all #######################
delete hintBox;
#endif
CFlashUpdateCheck::getInstance()->startThread();
//CUpdateCheck::getInstance()->startThread();
}
#if ENABLE_PKG_MANAGEMENT
if (g_settings.softupdate_autocheck_packages)