mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-19 02:12:10 +08:00
refactor: api cleanup (#7812)
* refactor(config): unify YAML persistence * refactor(config): remove redundant config APIs * refactor(config): remove unused config APIs * refactor(config): narrow profile APIs * fix(config): preserve profiles on invalid reorder * refactor(startup): narrow resolve helpers * refactor(config): unify mixed port defaults * refactor(network): simplify response APIs * refactor(config): make profile builders infallible * refactor(config): make profile activation infallible * refactor(api): simplify internal runtime APIs * refactor: consolidate internal config and window APIs
This commit is contained in:
@@ -177,7 +177,7 @@ pub async fn delete_profile(index: String) -> CmdResult {
|
||||
}
|
||||
};
|
||||
if should_update {
|
||||
logging_error!(Type::Config, profiles::activate_selected_nodes());
|
||||
profiles::activate_selected_nodes();
|
||||
}
|
||||
drop(config_update_guard);
|
||||
drop(profile_write_guard);
|
||||
@@ -241,7 +241,7 @@ async fn handle_success(current_value: Option<&String>) -> CmdResult<ValidationO
|
||||
.await
|
||||
.stringify_err()?;
|
||||
// Runtime refresh and tray rebuilding happen after saved node selections are restored.
|
||||
profiles::activate_selected_nodes().stringify_err()?;
|
||||
profiles::activate_selected_nodes();
|
||||
|
||||
if let Err(e) = profiles_save_file_safe().await {
|
||||
logging!(warn, Type::Cmd, "Warning: 异步保存配置文件失败: {e}");
|
||||
|
||||
Reference in New Issue
Block a user