diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index 1b608d88..30ba1160 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -263,6 +263,7 @@ impl UpdaterBuilder { app_name: self.app_name, current_version: self.current_version, version_comparator: self.version_comparator, + global_version_comparator: self.global_version_comparator, timeout: self.timeout, proxy: self.proxy, endpoints, @@ -295,6 +296,7 @@ pub struct Updater { app_name: String, current_version: Version, version_comparator: Option bool + Send + Sync>>, + global_version_comparator: Option, timeout: Option, proxy: Option, endpoints: Vec, @@ -405,7 +407,15 @@ impl Updater { let should_update = match self.version_comparator.as_ref() { Some(comparator) => comparator(self.current_version.clone(), release.clone()), - None => release.version > self.current_version, + None => { + match self.global_version_comparator.as_ref() { + Some(comparator) => comparator(self.current_version.clone(), release.clone()), + None => { + // default comparator + release.version > self.current_version + } + } + } }; let update = if should_update {