Optimized configuration update notification

This commit is contained in:
QIDI TECH
2024-02-23 16:04:36 +08:00
parent 1eb7e979b0
commit 2046b2f21f
2 changed files with 7 additions and 1 deletions

View File

@@ -901,7 +901,8 @@ private:
// non-static so its not loaded too early. If static, the translations wont load correctly.
const std::vector<NotificationData> basic_notifications = {
{NotificationType::Mouse3dDisconnected, NotificationLevel::RegularNotificationLevel, 10, _u8L("3D Mouse disconnected.") },
{NotificationType::PresetUpdateAvailable, NotificationLevel::ImportantNotificationLevel, 20, _u8L("Configuration update is available."), _u8L("See more."),
//Y24
{NotificationType::PresetUpdateAvailable, NotificationLevel::ImportantNotificationLevel, 0, _u8L("Configuration update is available."), _u8L("See more."),
[](wxEvtHandler* evnthndlr) {
if (evnthndlr != nullptr)
wxPostEvent(evnthndlr, PresetUpdateAvailableClickedEvent(EVT_PRESET_UPDATE_AVAILABLE_CLICKED));

View File

@@ -942,6 +942,11 @@ Updates PresetUpdater::priv::get_config_updates(const Semver &old_slic3r_version
new_update = Update(std::move(path_in_rsrc), std::move(bundle_path), *recommended, vp.name, vp.changelog_url, current_not_supported);
bundle_path_idx_to_install = path_idx_in_rsrc;
found = true;
//Y24
} else if (rsrc_vp.config_version > vp.config_version) {
new_update = Update(std::move(path_in_rsrc), std::move(bundle_path), *recommended, vp.name, vp.changelog_url, current_not_supported);
bundle_path_idx_to_install = path_idx_in_rsrc;
found = true;
} else {
BOOST_LOG_TRIVIAL(warning) << format("The recommended config version for vendor `%1%` in resources does not match the recommended\n"
" config version for this version of QIDISlicer. Corrupted installation?", idx.vendor());