From 23fbfe270690bd3c3e49b00d3387a9d334370166 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 12 Apr 2021 06:16:55 +0200 Subject: [PATCH] update_settings.cpp: split statement for update settings notify Avoid double action --- src/gui/update_settings.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gui/update_settings.cpp b/src/gui/update_settings.cpp index 73c3d19a5..b9fcef615 100644 --- a/src/gui/update_settings.cpp +++ b/src/gui/update_settings.cpp @@ -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; }