diff --git a/crates/zeta/src/zeta.rs b/crates/zeta/src/zeta.rs index d17c73fbc6dc65257c4d2beb6c7d4cf74184c3a2..da90e8e312c94a81e3d69e62f6a4d4aa9baeafc2 100644 --- a/crates/zeta/src/zeta.rs +++ b/crates/zeta/src/zeta.rs @@ -335,7 +335,7 @@ impl Zeta { update_required: false, license_detection_watchers: HashMap::default(), user_store, - recent_editors: VecDeque::with_capacity(MAX_RECENT_PROJECT_ENTRIES_COUNT), + recent_editors: VecDeque::new(), } } @@ -1269,6 +1269,10 @@ and then another } fn handle_active_workspace_item_changed(&mut self, cx: &Context) { + if !self.data_collection_choice.read(cx).is_enabled() { + self.recent_editors.clear(); + return; + } if let Some(active_editor) = self .workspace .read_with(cx, |workspace, cx| {