Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

remove current recording mutex contention

Brendan Allan7676bbf8594f
diff --git a/apps/desktop/src-tauri/src/lib.rs b/apps/desktop/src-tauri/src/lib.rs
index 74f422c73..bd636da1f 100644
--- a/apps/desktop/src-tauri/src/lib.rs
+++ b/apps/desktop/src-tauri/src/lib.rs
@@ -377,9 +377,8 @@ fn create_in_progress_recording_window(app: &AppHandle) {
#[tauri::command]
#[specta::specta]
async fn stop_recording(app: AppHandle, state: MutableState<'_, App>) -> Result<(), String> {
- let mut state = state.write().await;
-
- let Some(mut current_recording) = state.clear_current_recording() else {
+ // dropping the mutex lock is important to ensure that the getCurrentRecording query isn't blocked
+ let Some(mut current_recording) = state.write().await.clear_current_recording() else {
return Err("Recording not in progress".to_string());
};
diff --git a/packages/ui-solid/src/auto-imports.d.ts b/packages/ui-solid/src/auto-imports.d.ts
index 3d2b7b708..304b9a1d5 100644
--- a/packages/ui-solid/src/auto-imports.d.ts
+++ b/packages/ui-solid/src/auto-imports.d.ts
@@ -3,7 +3,6 @@
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import
-// biome-ignore lint: disable
export {}
declare global {
const IconCapArrows: typeof import('~icons/cap/arrows.jsx')['default']