Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

title_bar: Fix share button being hidden when any modal is open (#51862)

Finn Eversde4522ed8f2d
diff --git a/Cargo.lock b/Cargo.lock
index 2310b2aa3dc..207ceaa2a68 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 d290b4c767b..cdac434f4e6 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 027d53a3dff..40ea36e815c 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::<RemoteConnectionModal>(cx)
+ .is_some()
+ })
.unwrap_or(false);
let room = room.read(cx);