Skip to content

Commit 13dc3e2

Browse files
committed
feat: 支持 Java 语言环境安装
1 parent 43b4f88 commit 13dc3e2

6 files changed

Lines changed: 677 additions & 7 deletions

File tree

src-tauri/src/env_commands.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,16 @@ pub async fn switch_environment_version(
4646
) -> Result<(), String> {
4747
info!("切换 {} 到版本 {}", language, version);
4848
let manager = env_manager.lock().await;
49-
manager
50-
.switch_version(&language, &version, app_handle)
51-
.await
49+
let result = manager
50+
.switch_version(&language, &version, app_handle.clone())
51+
.await;
52+
53+
if result.is_ok() {
54+
app_handle.emit("config-updated", ()).ok();
55+
info!("已发送配置更新事件");
56+
}
57+
58+
result
5259
}
5360

5461
#[tauri::command]

0 commit comments

Comments
 (0)