mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-12-06 23:00:15 +08:00
feat(profile): raise auto-update intervals below 24h
Each auto-update reloads the core, which drops every connection running through a `proxy-providers` entry. Existing profiles are corrected once at startup; the form warns about shorter intervals but still saves them.
This commit is contained in:
@@ -21,6 +21,8 @@ pub static PORTABLE_FLAG: OnceCell<bool> = OnceCell::new();
|
||||
pub static CLASH_CONFIG: &str = "config.yaml";
|
||||
pub static VERGE_CONFIG: &str = "verge.yaml";
|
||||
pub static PROFILE_YAML: &str = "profiles.yaml";
|
||||
/// Marks that the one-shot raise of too-short auto-update intervals has already run.
|
||||
pub static UPDATE_INTERVAL_MIGRATED: &str = ".update-interval-migrated";
|
||||
|
||||
/// init portable flag
|
||||
pub fn init_portable_flag() -> Result<()> {
|
||||
@@ -170,6 +172,10 @@ pub fn profiles_path() -> Result<PathBuf> {
|
||||
Ok(app_home_dir()?.join(PROFILE_YAML))
|
||||
}
|
||||
|
||||
pub fn update_interval_migrated_path() -> Result<PathBuf> {
|
||||
Ok(app_home_dir()?.join(UPDATE_INTERVAL_MIGRATED))
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
pub fn service_path() -> Result<PathBuf> {
|
||||
let res_dir = app_resources_dir()?;
|
||||
|
||||
Reference in New Issue
Block a user