[fix] fix update button lag in release mode by using non-blocking URL opener.

This commit is contained in:
dijunkun
2026-03-10 10:39:05 +08:00
parent b230b851e4
commit 263c5eefd3
3 changed files with 37 additions and 38 deletions

View File

@@ -1,5 +1,4 @@
#include <algorithm>
#include <cstdlib>
#include <string>
#include "layout.h"
@@ -184,14 +183,7 @@ int Render::UpdateNotificationWindow() {
localization::update[localization_language_index_].c_str())) {
// open download page
std::string url = "https://crossdesk.cn";
#if defined(_WIN32)
std::string cmd = "start " + url;
#elif defined(__APPLE__)
std::string cmd = "open " + url;
#else
std::string cmd = "xdg-open " + url;
#endif
system(cmd.c_str());
OpenUrl(url);
show_update_notification_window_ = false;
}