Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

Trigger toggle-recording event earlier to make sure tray icon changes.

Ilyaea2036c7efc6
diff --git a/apps/desktop/src/components/windows/inner/Recorder.tsx b/apps/desktop/src/components/windows/inner/Recorder.tsx
index 33a7dce00..cb34f1c44 100644
--- a/apps/desktop/src/components/windows/inner/Recorder.tsx
+++ b/apps/desktop/src/components/windows/inner/Recorder.tsx
@@ -183,6 +183,8 @@ export const Recorder = () => {
window.hide();
}
});
+
+ emit("toggle-recording", true);
await invoke("start_dual_recording", {
options: {
user_id: videoData.user_id,
@@ -195,7 +197,7 @@ export const Recorder = () => {
},
}).catch((error) => {
console.error("Error invoking start_screen_recording:", error);
- }).then(() => emit("toggle-recording", true));
+ });
};
const handleStartAllRecordings = async () => {