Enable vendor profile updates by default, except in stealth mode (#17289)

* always enable OTA

* Stop vendor profile update checks in stealth mode

* Keep vendor profile updates off in dev builds
This commit is contained in:
SoftFever authored and GitHub committed 2026-11-05 18:46:13 +08:00
1 parent f96bbe8db1
commit 637d7a9ce6
2 files changed
+6 -6

No files matched your search

-5
View File
@@ -749,11 +749,6 @@ void AppConfig::set_defaults()
set_bool("use_printer_agents", false);
}
if (get("enable_ota").empty())
{
set_bool("enable_ota", false);
}
// Remove legacy window positions/sizes
erase("app", "main_frame_maximized");
erase("app", "main_frame_pos");
+6 -1
View File
@@ -303,7 +303,9 @@ void PresetUpdater::priv::set_download_prefs(AppConfig *app_config)
version_check_url = app_config->version_check_url();
auto profile_update_url = app_config->profile_update_url();
if (!profile_update_url.empty() && app_config->get_bool("enable_ota"))
// Dev builds keep the profiles from their own source tree; an over-the-air bundle would replace them.
const bool dev_build = boost::algorithm::icontains(std::string(SoftFever_VERSION), "dev");
if (!profile_update_url.empty() && !dev_build)
enabled_config_update = true;
else
enabled_config_update = false;
@@ -1383,6 +1385,9 @@ void PresetUpdater::check_vendor_update(const std::string& vendor_id)
{
if (!p->enabled_config_update) return;
if (vendor_id.empty()) return;
// Stealth mode can be switched off mid-session, so it is checked before the vendor is marked
// as checked: the next printer change after that still queries the server.
if (GUI::wxGetApp().app_config->get_stealth_mode()) return;
if (!p->checked_vendors.insert(vendor_id).second)
return;