feature diff server update and import update on web resource

This commit is contained in:
alves
2026-01-04 18:21:53 +08:00
parent f8c2084e33
commit f65b104c1f
2 changed files with 4 additions and 4 deletions

View File

@@ -1653,7 +1653,7 @@ void PresetUpdater::sync_web_async()
GUI::wxGetApp().CallAfter([this] {
std::string zipfilepath = this->p->cache_path.string() + "/flutter_web.zip";
BOOST_LOG_TRIVIAL(debug) << "[Orca Updater] sync_web_async completed, checking updates...";
load_lutter_web(zipfilepath);
load_lutter_web(zipfilepath, true);
});
});
}
@@ -1737,7 +1737,7 @@ bool PresetUpdater::version_check_enabled() const
}
void PresetUpdater::load_lutter_web(const std::string& zip_file)
void PresetUpdater::load_lutter_web(const std::string& zip_file, bool serverUpdate)
{
boost::filesystem::path temp_path = boost::filesystem::temp_directory_path() / "orca_temp_flutter_import";
try {
@@ -1854,7 +1854,7 @@ void PresetUpdater::load_lutter_web(const std::string& zip_file)
}
wxString message;
if (!outdated_presets.empty()) {
if (!outdated_presets.empty() && !serverUpdate) {
message = _L("This web resouce could not be imported due to outdated versions.") + "\n";
for (const auto& preset : outdated_presets) {
message += "" + preset + "\n";

View File

@@ -65,7 +65,7 @@ public:
void import_flutter_web();
void load_lutter_web(const std::string& zip_file);
void load_lutter_web(const std::string& zip_file,bool serverUpdate = false);
void sync_config_async();