fix: start blocking the gui

This commit is contained in:
2025-03-28 23:34:04 +00:00
parent 90f36e5fa6
commit ad5a800d1b
2 changed files with 12 additions and 23 deletions

View File

@ -63,8 +63,13 @@ pub async fn startline(app: AppHandle, refresh: bool) -> Result<(), String> {
log::debug!("{}", hash);
p.line_up(hash, refresh, app.clone()).await
.map_err(|e| format!("Lineup failed:\n{}", e))?;
p.start(app.clone()).await
.map_err(|e| format!("Startup failed:\n{}", e))?;
let app_clone = app.clone();
let p_clone = p.clone();
tauri::async_runtime::spawn(async move {
if let Err(e) = p_clone.start(app_clone).await {
log::error!("Startup failed:\n{}", e);
}
});
Ok(())
} else {