Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(gpui): allow tray stop fallback when global shortcuts session fails

martin el cheikh3085ba459f3c
diff --git a/apps/desktop-gpui/src/hotkeys.rs b/apps/desktop-gpui/src/hotkeys.rs
index 65f4e6dee..e4f8d3b38 100644
--- a/apps/desktop-gpui/src/hotkeys.rs
+++ b/apps/desktop-gpui/src/hotkeys.rs
@@ -408,8 +408,8 @@ async fn run_portal_stop(
portal.get_property::<u32>("version"),
)
.await??;
- *fallback_safe = false;
let session = tokio::time::timeout(Duration::from_secs(5), portal.create_session()).await??;
+ *fallback_safe = false;
let outcome = async {
let session_path = serde_json::to_value(&session)?.as_str().ok_or_else(|| anyhow::anyhow!("Invalid shortcut session identity"))?.to_owned();
let shortcut_id = format!("cap-recording-stop-{generation}");