diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index 27048fc7a23237594c9410e3663595cea4176e73..33f1c4ab7218f6f1c8741a1dd22961f667ec4b8b 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -1393,19 +1393,19 @@ impl Workspace { } }) .detach(); + } - cx.observe_global_in::(window, |this, window, cx| { - if ProjectSettings::get_global(cx).session.trust_all_worktrees { - if let Some(trusted_worktrees) = TrustedWorktrees::try_get_global(cx) { - trusted_worktrees.update(cx, |trusted_worktrees, cx| { - trusted_worktrees.auto_trust_all(cx); - }) - } + cx.observe_global_in::(window, |this, window, cx| { + if ProjectSettings::get_global(cx).session.trust_all_worktrees { + if let Some(trusted_worktrees) = TrustedWorktrees::try_get_global(cx) { + trusted_worktrees.update(cx, |trusted_worktrees, cx| { + trusted_worktrees.auto_trust_all(cx); + }) } - this.reposition_panels(window, cx); - }) - .detach(); - } + } + this.reposition_panels(window, cx); + }) + .detach(); cx.subscribe_in(&project, window, move |this, _, event, window, cx| { match event {