Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Tell the user when screen-sharing fails (#7171)
Conrad Irwin3025e5620d24
diff --git a/crates/collab_ui/src/collab_ui.rs b/crates/collab_ui/src/collab_ui.rsindex befdf5db741..76894ec17f5 100644--- a/crates/collab_ui/src/collab_ui.rs+++ b/crates/collab_ui/src/collab_ui.rs@@ -14,13 +14,13 @@ pub use collab_panel::CollabPanel;pub use collab_titlebar_item::CollabTitlebarItem;use gpui::{actions, point, AppContext, GlobalPixels, Pixels, PlatformDisplay, Size, Task, WindowBounds,- WindowKind, WindowOptions,+ WindowContext, WindowKind, WindowOptions,};pub use panel_settings::{ChatPanelSettings, CollaborationPanelSettings, NotificationPanelSettings,};use settings::Settings;-use workspace::AppState;+use workspace::{notifications::DetachAndPromptErr, AppState};actions!(collab,@@ -41,7 +41,7 @@ pub fn init(app_state: &Arc<AppState>, cx: &mut AppContext) {notifications::init(&app_state, cx);}-pub fn toggle_screen_sharing(_: &ToggleScreenSharing, cx: &mut AppContext) {+pub fn toggle_screen_sharing(_: &ToggleScreenSharing, cx: &mut WindowContext) {let call = ActiveCall::global(cx).read(cx);if let Some(room) = call.room().cloned() {let client = call.client();@@ -64,7 +64,7 @@ pub fn toggle_screen_sharing(_: &ToggleScreenSharing, cx: &mut AppContext) {room.share_screen(cx)}});- toggle_screen_sharing.detach_and_log_err(cx);+ toggle_screen_sharing.detach_and_prompt_err("Sharing Screen Failed", cx, |e, _| Some(format!("{:?}\n\nPlease check that you have given Zed permissions to record your screen in Settings.", e)));}}