Tinker with the reporting of telemetry events (#34239)
Release Notes: - N/A --------- Co-authored-by: Katie Geer <katie@zed.dev>
This commit is contained in:
parent
fbead09c30
commit
625a4b90a5
3 changed files with 15 additions and 4 deletions
|
@ -51,7 +51,6 @@ impl OnboardingBanner {
|
|||
}
|
||||
|
||||
fn dismiss(&mut self, cx: &mut Context<Self>) {
|
||||
telemetry::event!("Banner Dismissed", source = self.source);
|
||||
persist_dismissed(&self.source, cx);
|
||||
self.dismissed = true;
|
||||
cx.notify();
|
||||
|
@ -144,7 +143,10 @@ impl Render for OnboardingBanner {
|
|||
div().border_l_1().border_color(border_color).child(
|
||||
IconButton::new("close", IconName::Close)
|
||||
.icon_size(IconSize::Indicator)
|
||||
.on_click(cx.listener(|this, _, _window, cx| this.dismiss(cx)))
|
||||
.on_click(cx.listener(|this, _, _window, cx| {
|
||||
telemetry::event!("Banner Dismissed", source = this.source);
|
||||
this.dismiss(cx)
|
||||
}))
|
||||
.tooltip(|window, cx| {
|
||||
Tooltip::with_meta(
|
||||
"Close Announcement Banner",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue