mirror of
https://github.com/nekename/OpenDeck.git
synced 2026-10-28 09:44:01 +00:00
fix: only compare major and minor app versions to allow downgrading within the same minor version
This commit is contained in:
1 file changed
+5
-2
@@ -90,7 +90,10 @@ async fn main() {
|
||||
let mut settings = store::get_settings()?;
|
||||
use std::cmp::Ordering;
|
||||
use tauri_plugin_dialog::{DialogExt, MessageDialogKind};
|
||||
match semver::Version::parse(built_info::PKG_VERSION)?.cmp(&semver::Version::parse(&settings.value.version)?) {
|
||||
let current_version = semver::Version::parse(built_info::PKG_VERSION)?;
|
||||
let settings_version = semver::Version::parse(&settings.value.version)?;
|
||||
let cmp = (current_version.major, current_version.minor).cmp(&(settings_version.major, settings_version.minor));
|
||||
match cmp {
|
||||
Ordering::Less => {
|
||||
app.get_webview_window("main").unwrap().close().unwrap();
|
||||
app.dialog()
|
||||
@@ -129,7 +132,7 @@ Enjoy!"#,
|
||||
r#"{PRODUCT_NAME} has been updated to v{}!
|
||||
Every update brings features, bug fixes, and other improvements, which I spend my time implementing for free.
|
||||
|
||||
If you spent $125 on your hardware, please consider spending $5 on the software that makes it work.
|
||||
If you spent $125 on your hardware, please consider spending $10 on the software that makes it work.
|
||||
You can donate to support development with just a few clicks on GitHub Sponsors.
|
||||
If you have already donated, thank you so much for your support!"#,
|
||||
built_info::PKG_VERSION
|
||||
|
||||
Reference in new issue
Block a user