forked from akanyan/STARTLINER
fix: start blocking the gui
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user