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.

Format code

Marshall Bowers5c060ceb1c2e
diff --git a/crates/collab_ui2/src/collab_panel.rs b/crates/collab_ui2/src/collab_panel.rs
index c2da29ba9f0..ec723df25d7 100644
--- a/crates/collab_ui2/src/collab_panel.rs
+++ b/crates/collab_ui2/src/collab_panel.rs
@@ -2225,18 +2225,14 @@ impl CollabPanel {
.selected(is_selected),
)
.when(section == Section::Channels, |el| {
- el.drag_over::<Channel>(|style| {
- style.bg(cx.theme().colors().ghost_element_hover)
- })
- .on_drop(cx.listener(
- move |this, dragged_channel: &Channel, cx| {
+ el.drag_over::<Channel>(|style| style.bg(cx.theme().colors().ghost_element_hover))
+ .on_drop(cx.listener(move |this, dragged_channel: &Channel, cx| {
this.channel_store
.update(cx, |channel_store, cx| {
channel_store.move_channel(dragged_channel.id, None, cx)
})
.detach_and_log_err(cx)
- },
- ))
+ }))
});
if section == Section::Offline {
@@ -2451,22 +2447,14 @@ impl CollabPanel {
width,
})
})
- .drag_over::<Channel>(|style| {
- style.bg(cx.theme().colors().ghost_element_hover)
- })
- .on_drop(
- cx.listener(move |this, dragged_channel: &Channel, cx| {
- this.channel_store
- .update(cx, |channel_store, cx| {
- channel_store.move_channel(
- dragged_channel.id,
- Some(channel_id),
- cx,
- )
- })
- .detach_and_log_err(cx)
- }),
- )
+ .drag_over::<Channel>(|style| style.bg(cx.theme().colors().ghost_element_hover))
+ .on_drop(cx.listener(move |this, dragged_channel: &Channel, cx| {
+ this.channel_store
+ .update(cx, |channel_store, cx| {
+ channel_store.move_channel(dragged_channel.id, Some(channel_id), cx)
+ })
+ .detach_and_log_err(cx)
+ }))
.child(
ListItem::new(channel_id as usize)
// Offset the indent depth by one to give us room to show the disclosure.