From 69e28d04b0b459edb66971941fbf2da69ba1a624 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Mon, 9 Jan 2023 10:19:11 -0800 Subject: [PATCH] Added open screenshare when following into non-followable buffer --- crates/workspace/src/workspace.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index 06e19bbf88c1dcabb1827254209a08d8b104cd85..6f37565fa4d3a62812ba4f7862995fa0d43694e8 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -2142,7 +2142,6 @@ impl Workspace { let call = self.active_call()?; let room = call.read(cx).room()?.read(cx); let participant = room.remote_participant_for_peer_id(leader_id)?; - let mut items_to_add = Vec::new(); match participant.location { call::ParticipantLocation::SharedProject { project_id } => { @@ -2153,6 +2152,12 @@ impl Workspace { .and_then(|id| state.items_by_leader_view_id.get(&id)) { items_to_add.push((pane.clone(), item.boxed_clone())); + } else { + if let Some(shared_screen) = + self.shared_screen_for_peer(leader_id, pane, cx) + { + items_to_add.push((pane.clone(), Box::new(shared_screen))); + } } } }