Differentiates beta releases. Always shows release notes as text. (#7067)

This commit is contained in:
Victor Usoltsev 2024-12-02 01:44:43 +13:00 committed by GitHub
parent a602eee441
commit ae07f17ca0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 17 deletions

View file

@ -4280,7 +4280,6 @@ void GUI_App::check_new_version_sf(bool show_tips, int by_user)
best_pre = tag_version; best_pre = tag_version;
best_pre_url = root.get<std::string>("html_url"); best_pre_url = root.get<std::string>("html_url");
best_pre_content = root.get<std::string>("body"); best_pre_content = root.get<std::string>("body");
best_pre.set_prerelease("Preview");
} }
} else { } else {
if (best_release < tag_version) { if (best_release < tag_version) {
@ -4302,7 +4301,6 @@ void GUI_App::check_new_version_sf(bool show_tips, int by_user)
best_pre = tag_version; best_pre = tag_version;
best_pre_url = json_version.second.get<std::string>("html_url"); best_pre_url = json_version.second.get<std::string>("html_url");
best_pre_content = json_version.second.get<std::string>("body"); best_pre_content = json_version.second.get<std::string>("body");
best_pre.set_prerelease("Preview");
} }
} else { } else {
if (best_release < tag_version) { if (best_release < tag_version) {

View file

@ -504,19 +504,18 @@ void UpdateVersionDialog::update_version_info(wxString release_note, wxString ve
//bbs check whether the web display is used //bbs check whether the web display is used
bool use_web_link = false; bool use_web_link = false;
url_line = ""; url_line = "";
auto split_array = splitWithStl(release_note.ToStdString(), "###"); // Orca: not used in Orca Slicer
// auto split_array = splitWithStl(release_note.ToStdString(), "###");
if (split_array.size() >= 3) { // if (split_array.size() >= 3) {
for (auto i = 0; i < split_array.size(); i++) { // for (auto i = 0; i < split_array.size(); i++) {
std::string url = split_array[i]; // std::string url = split_array[i];
if (std::strstr(url.c_str(), "http://") != NULL || std::strstr(url.c_str(), "https://") != NULL) { // if (std::strstr(url.c_str(), "http://") != NULL || std::strstr(url.c_str(), "https://") != NULL) {
use_web_link = true; // use_web_link = true;
url_line = url; // url_line = url;
break; // break;
} // }
} // }
} // }
if (use_web_link) { if (use_web_link) {
m_brand->Hide(); m_brand->Hide();