From 026b3a1d0f87d97206d54228e7b8ae58b4080eab Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Fri, 29 Sep 2023 08:54:23 -0700 Subject: [PATCH] Remove uneeded Workspace::project_remote_id_changed method --- crates/workspace/src/workspace.rs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index 256ecfd3e9..9834f47370 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -622,9 +622,8 @@ impl Workspace { cx.observe(&project, |_, _, cx| cx.notify()).detach(); cx.subscribe(&project, move |this, _, event, cx| { match event { - project::Event::RemoteIdChanged(remote_id) => { + project::Event::RemoteIdChanged(_) => { this.update_window_title(cx); - this.project_remote_id_changed(*remote_id, cx); } project::Event::CollaboratorLeft(peer_id) => { @@ -776,7 +775,8 @@ impl Workspace { }), ]; - let mut this = Workspace { + cx.defer(|this, cx| this.update_window_title(cx)); + Workspace { weak_self: weak_handle.clone(), modal: None, zoomed: None, @@ -805,10 +805,7 @@ impl Workspace { leader_updates_tx, subscriptions, pane_history_timestamp, - }; - this.project_remote_id_changed(project.read(cx).remote_id(), cx); - cx.defer(|this, cx| this.update_window_title(cx)); - this + } } fn new_local( @@ -2512,10 +2509,6 @@ impl Workspace { &self.active_pane } - fn project_remote_id_changed(&mut self, _project_id: Option, _cx: &mut ViewContext) { - // TODO - } - fn collaborator_left(&mut self, peer_id: PeerId, cx: &mut ViewContext) { if let Some(states_by_pane) = self.follower_states_by_leader.remove(&peer_id) { for state in states_by_pane.into_values() {