From a5e037befa7067501089928947d51e49c07f9ffe Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Fri, 15 Dec 2023 13:26:48 -0800 Subject: [PATCH] Avoid duplicate render of a pane when it is zoomed --- crates/workspace2/src/pane_group.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/workspace2/src/pane_group.rs b/crates/workspace2/src/pane_group.rs index 4f29f08ef2666f752113a6c347e54c91011f31d9..b52cec2b1885516494824c21ae27ee5d91e959b4 100644 --- a/crates/workspace2/src/pane_group.rs +++ b/crates/workspace2/src/pane_group.rs @@ -172,6 +172,10 @@ impl Member { ) -> impl IntoElement { match self { Member::Pane(pane) => { + if zoomed == Some(&pane.downgrade().into()) { + return div().into_any(); + } + let leader = follower_states.get(pane).and_then(|state| { let room = active_call?.read(cx).room()?.read(cx); room.remote_participant_for_peer_id(state.leader_id)