mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: set min version number (#5390)
* chore: set min version number * chore: fix test
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
#![allow(clippy::not_unsafe_ptr_arg_deref)]
|
||||
|
||||
use allo_isolate::Isolate;
|
||||
use std::sync::Arc;
|
||||
use std::{ffi::CStr, os::raw::c_char};
|
||||
|
||||
use lazy_static::lazy_static;
|
||||
use parking_lot::Mutex;
|
||||
use semver::Version;
|
||||
use std::sync::Arc;
|
||||
use std::{ffi::CStr, os::raw::c_char};
|
||||
use tracing::{debug, error, info, trace, warn};
|
||||
|
||||
use flowy_core::config::AppFlowyCoreConfig;
|
||||
@ -67,8 +67,16 @@ pub extern "C" fn init_sdk(_port: i64, data: *mut c_char) -> i64 {
|
||||
let _ = save_appflowy_cloud_config(&configuration.root, &configuration.appflowy_cloud_config);
|
||||
}
|
||||
|
||||
let mut app_version =
|
||||
Version::parse(&configuration.app_version).unwrap_or_else(|_| Version::new(0, 5, 8));
|
||||
|
||||
let min_version = Version::new(0, 5, 8);
|
||||
if app_version < min_version {
|
||||
app_version = min_version;
|
||||
}
|
||||
|
||||
let config = AppFlowyCoreConfig::new(
|
||||
configuration.app_version,
|
||||
app_version,
|
||||
configuration.custom_app_path,
|
||||
configuration.origin_app_path,
|
||||
configuration.device_id,
|
||||
|
Reference in New Issue
Block a user