Change summary
crates/workspace/src/pane.rs | 9 +++++++++
crates/workspace/src/workspace.rs | 4 ----
2 files changed, 9 insertions(+), 4 deletions(-)
Detailed changes
@@ -954,6 +954,11 @@ impl Pane {
if allow_preview {
pane.set_preview_item_id(Some(new_item.item_id()), cx);
}
+
+ if let Some(text) = new_item.telemetry_event_text(cx) {
+ telemetry::event!(text);
+ }
+
pane.add_item_inner(
new_item,
true,
@@ -1170,6 +1175,10 @@ impl Pane {
window: &mut Window,
cx: &mut Context<Self>,
) {
+ if let Some(text) = item.telemetry_event_text(cx) {
+ telemetry::event!(text);
+ }
+
self.add_item_inner(
item,
activate_pane,
@@ -3294,10 +3294,6 @@ impl Workspace {
window: &mut Window,
cx: &mut App,
) {
- if let Some(text) = item.telemetry_event_text(cx) {
- telemetry::event!(text);
- }
-
pane.update(cx, |pane, cx| {
pane.add_item(
item,