From de4522ed8f2d8e7cecf7f7d2a34ec083fbcde8cb Mon Sep 17 00:00:00 2001 From: Finn Evers Date: Wed, 18 Mar 2026 20:29:58 +0100 Subject: [PATCH] title_bar: Fix share button being hidden when any modal is open (#51862) This check was initially added in https://github.com/zed-industries/zed/pull/19885/changes but has regressed since. Making it explicit here again to stop this from happening. Release Notes: - N/A --- Cargo.lock | 1 + crates/title_bar/Cargo.toml | 1 + crates/title_bar/src/collab.rs | 7 ++++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 2310b2aa3dcc7c0ef08176793103afc6c51d0447..207ceaa2a68a2f665df888e1e8554ae865700ea4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17777,6 +17777,7 @@ dependencies = [ "recent_projects", "release_channel", "remote", + "remote_connection", "rpc", "schemars", "semver", diff --git a/crates/title_bar/Cargo.toml b/crates/title_bar/Cargo.toml index d290b4c767b7b012561ee0ec6c2e769b653436df..cdac434f4e6a247e69e218875f7c17ac39380e14 100644 --- a/crates/title_bar/Cargo.toml +++ b/crates/title_bar/Cargo.toml @@ -47,6 +47,7 @@ notifications.workspace = true project.workspace = true recent_projects.workspace = true remote.workspace = true +remote_connection.workspace = true rpc.workspace = true semver.workspace = true schemars.workspace = true diff --git a/crates/title_bar/src/collab.rs b/crates/title_bar/src/collab.rs index 027d53a3dff4fb285f1e6a4a745ecd93bd1a3857..40ea36e815c7a0dd001b8da648cde9c0cfc36b35 100644 --- a/crates/title_bar/src/collab.rs +++ b/crates/title_bar/src/collab.rs @@ -12,6 +12,7 @@ use gpui::{App, Task, Window}; use icons::IconName; use livekit_client::ConnectionQuality; use project::WorktreeSettings; +use remote_connection::RemoteConnectionModal; use rpc::proto::{self}; use settings::{Settings as _, SettingsLocation}; use theme::ActiveTheme; @@ -342,7 +343,11 @@ impl TitleBar { let is_connecting_to_project = self .workspace - .update(cx, |workspace, cx| workspace.has_active_modal(window, cx)) + .update(cx, |workspace, cx| { + workspace + .active_modal::(cx) + .is_some() + }) .unwrap_or(false); let room = room.read(cx);