fix: after importing a subscription, it cannot be automatically switched to the current subscription.

This commit is contained in:
huzibaca
2024-09-13 18:17:14 +08:00
parent ba487611ee
commit 6d7711f3ea
5 changed files with 45 additions and 28 deletions

View File

@@ -32,12 +32,8 @@ pub async fn enhance_profiles() -> CmdResult {
}
#[tauri::command]
pub async fn import_profile(
url: String,
name: Option<String>,
option: Option<PrfOption>,
) -> CmdResult {
let item = wrap_err!(PrfItem::from_url(&url, name, None, option).await)?;
pub async fn import_profile(url: String, option: Option<PrfOption>) -> CmdResult {
let item = wrap_err!(PrfItem::from_url(&url, None, None, option).await)?;
wrap_err!(Config::profiles().data().append_item(item))
}