optimize status fetch

This commit is contained in:
Julian Freeman
2026-04-04 17:20:06 -04:00
parent 66b6ac4738
commit fd8241fd43
3 changed files with 52 additions and 4 deletions

View File

@@ -177,6 +177,11 @@ async fn install_software(
state.install_tx.send(task).await.map_err(|e| e.to_string())
}
#[tauri::command]
async fn get_software_info(app: AppHandle, id: String) -> Option<Software> {
tokio::task::spawn_blocking(move || winget::get_software_info(&app, &id)).await.unwrap_or(None)
}
#[tauri::command]
fn get_logs_history() -> Vec<LogPayload> {
vec![]
@@ -541,6 +546,7 @@ pub fn run() {
get_essentials,
get_installed_software,
get_updates,
get_software_info,
install_software,
get_logs_history
])