Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
Make recovery scan non-blocking and fix window show logic
Richie McIlroy327311b93f1b
diff --git a/apps/desktop/src-tauri/src/recovery.rs b/apps/desktop/src-tauri/src/recovery.rsindex 2c87cd1c3..84e1d979d 100644--- a/apps/desktop/src-tauri/src/recovery.rs+++ b/apps/desktop/src-tauri/src/recovery.rs@@ -54,18 +54,22 @@ pub async fn find_incomplete_recordings(return Ok(Vec::new());}- let incomplete_list = RecoveryManager::find_incomplete(&recordings_dir);-- let result = incomplete_list- .into_iter()- .filter(|recording| is_recording_after_cutoff(&recording.meta.pretty_name))- .map(|recording| IncompleteRecordingInfo {- project_path: recording.project_path.to_string_lossy().to_string(),- pretty_name: recording.meta.pretty_name.clone(),- segment_count: recording.recoverable_segments.len() as u32,- estimated_duration_secs: recording.estimated_duration.as_secs_f64(),- })- .collect();+ let result = tokio::task::spawn_blocking(move || {+ let incomplete_list = RecoveryManager::find_incomplete(&recordings_dir);++ incomplete_list+ .into_iter()+ .filter(|recording| is_recording_after_cutoff(&recording.meta.pretty_name))+ .map(|recording| IncompleteRecordingInfo {+ project_path: recording.project_path.to_string_lossy().to_string(),+ pretty_name: recording.meta.pretty_name.clone(),+ segment_count: recording.recoverable_segments.len() as u32,+ estimated_duration_secs: recording.estimated_duration.as_secs_f64(),+ })+ .collect::<Vec<_>>()+ })+ .await+ .map_err(|e| format!("Recovery scan task failed: {e}"))?;Ok(result)}diff --git a/apps/desktop/src-tauri/src/windows.rs b/apps/desktop/src-tauri/src/windows.rsindex 76c020ab2..ddd0d8453 100644--- a/apps/desktop/src-tauri/src/windows.rs+++ b/apps/desktop/src-tauri/src/windows.rs@@ -669,6 +669,8 @@ impl ShowCapWindow {error!("Error initializing camera preview: {err}");window.close().ok();}+ } else {+ window.show().ok();}#[cfg(target_os = "macos")]