Fix broken collaboration UI from #18308 (#18372)

Fixes a bug introduced by #18308, that caused the call controls to
render incorrectly.

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki 2024-09-25 16:03:08 -07:00 committed by GitHub
parent 64532e94e4
commit 3161aedcb0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -284,14 +284,14 @@ impl TitleBar {
let room = room.read(cx);
let project = self.project.read(cx);
let is_local = project.is_local() || project.is_via_ssh();
let is_dev_server_project = project.dev_server_project_id().is_some();
let is_shared = project.is_shared();
let is_shared = (is_local || is_dev_server_project) && project.is_shared();
let is_muted = room.is_muted();
let is_deafened = room.is_deafened().unwrap_or(false);
let is_screen_sharing = room.is_screen_sharing();
let can_use_microphone = room.can_use_microphone();
let can_share_projects = room.can_share_projects()
&& (is_dev_server_project || project.is_local() || project.is_via_ssh());
let can_share_projects = room.can_share_projects();
let platform_supported = match self.platform_style {
PlatformStyle::Mac => true,
PlatformStyle::Linux | PlatformStyle::Windows => false,
@ -299,7 +299,7 @@ impl TitleBar {
let mut children = Vec::new();
if can_share_projects {
if (is_local || is_dev_server_project) && can_share_projects {
children.push(
Button::new(
"toggle_sharing",