mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-19 02:12:10 +08:00
fix: align draft commit/save semantics
- use committed profiles snapshot for lifecycle saves (avoid persisting uncommitted drafts) - remove apply/discard calls after profiles with_data_modify helpers - persist profiles metadata explicitly in create_profile - apply clash draft before saving mode changes - surface deep-link profile save failures via logging
This commit is contained in:
@@ -9,7 +9,7 @@ use crate::{
|
||||
config::{Config, PrfItem, profiles},
|
||||
core::{CoreManager, handle},
|
||||
};
|
||||
use clash_verge_logging::{Type, logging};
|
||||
use clash_verge_logging::{Type, logging, logging_error};
|
||||
|
||||
pub(super) async fn resolve_scheme(param: &str) -> Result<()> {
|
||||
logging!(info, Type::Config, "received deep link: {param}");
|
||||
@@ -94,7 +94,7 @@ async fn import_subscription(url: &str, name: Option<&String>) {
|
||||
}
|
||||
|
||||
Config::profiles().await.apply();
|
||||
let _ = Config::profiles().await.data_arc().save_file().await;
|
||||
logging_error!(Type::Config, Config::profiles().await.data_arc().save_file().await);
|
||||
handle::Handle::notice_message(
|
||||
"import_sub_url::ok",
|
||||
"", // 空 msg 传入,我们不希望导致 后端-前端-后端 死循环,这里只做提醒。
|
||||
|
||||
Reference in New Issue
Block a user