mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-18 09:52:13 +08:00
fix: duplicate checked tray menu when profile name are same (#2660)
This commit is contained in:
@@ -88,9 +88,8 @@ pub async fn patch_profiles_config(profiles: IProfiles) -> CmdResult {
|
||||
|
||||
/// 根据profile name修改profiles
|
||||
#[tauri::command]
|
||||
pub async fn patch_profiles_config_by_profile_name(profile_name: String) -> CmdResult {
|
||||
let profile_id = Config::profiles().data().get_profile_uid(&profile_name);
|
||||
let profiles = IProfiles{current: profile_id, items: None};
|
||||
pub async fn patch_profiles_config_by_profile_index(profile_index: String) -> CmdResult {
|
||||
let profiles = IProfiles{current: Some(profile_index), items: None};
|
||||
patch_profiles_config(profiles).await
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user