Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

fixup! Add contact finder, change ui::List's on_click handler signature

Piotr Osiewicz9fb3cb6a697c
diff --git a/crates/ui2/src/components/context_menu.rs b/crates/ui2/src/components/context_menu.rs
index c9048418382..fda446a78b6 100644
--- a/crates/ui2/src/components/context_menu.rs
+++ b/crates/ui2/src/components/context_menu.rs
@@ -4,9 +4,9 @@ use std::rc::Rc;
use crate::{prelude::*, v_stack, Label, List};
use crate::{ListItem, ListSeparator, ListSubHeader};
use gpui::{
- overlay, px, Action, AnchorCorner, AnyElement, AppContext, Bounds, ClickEvent, DismissEvent,
- DispatchPhase, Div, EventEmitter, FocusHandle, FocusableView, IntoElement, LayoutId,
- ManagedView, MouseButton, MouseDownEvent, Pixels, Point, Render, View, VisualContext,
+ overlay, px, Action, AnchorCorner, AnyElement, AppContext, Bounds, DismissEvent, DispatchPhase,
+ Div, EventEmitter, FocusHandle, FocusableView, IntoElement, LayoutId, ManagedView, MouseButton,
+ MouseDownEvent, Pixels, Point, Render, View, VisualContext,
};
pub enum ContextMenuItem {
diff --git a/crates/ui2/src/components/list.rs b/crates/ui2/src/components/list.rs
index 712e5d4c7b0..ecdd32d168f 100644
--- a/crates/ui2/src/components/list.rs
+++ b/crates/ui2/src/components/list.rs
@@ -1,6 +1,5 @@
use gpui::{
- div, px, AnyElement, ClickEvent, Div, ImageSource, IntoElement, MouseButton, MouseDownEvent,
- Stateful, StatefulInteractiveElement,
+ div, px, AnyElement, Div, ImageSource, IntoElement, MouseButton, MouseDownEvent, Stateful,
};
use smallvec::SmallVec;
use std::rc::Rc;
@@ -378,7 +377,6 @@ impl RenderOnce for ListItem {
.on_mouse_down(MouseButton::Left, {
let on_click = self.on_click.clone();
move |event, cx| {
- dbg!("Clicking!");
if let Some(on_click) = &on_click {
(on_click)(event, cx)
}