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.

Fix a few bugs in how channels are moved around

Mikayla Maki7145f47454e9
diff --git a/crates/collab/src/rpc.rs b/crates/collab/src/rpc.rs
index 819a3dc4f67..eaa3eb8261d 100644
--- a/crates/collab/src/rpc.rs
+++ b/crates/collab/src/rpc.rs
@@ -2364,7 +2364,7 @@ fn build_initial_channels_update(
update.channels.push(proto::Channel {
id: channel.id.to_proto(),
name: channel.name,
- parent_id: None,
+ parent_id: channel.parent_id.map(|id| id.to_proto()),
});
}
diff --git a/crates/collab_ui/src/panel.rs b/crates/collab_ui/src/panel.rs
index bca0da6176f..1973ddd9f6d 100644
--- a/crates/collab_ui/src/panel.rs
+++ b/crates/collab_ui/src/panel.rs
@@ -511,7 +511,7 @@ impl CollabPanel {
self.entries.push(ListEntry::Header(Section::Channels, 0));
let channels = channel_store.channels();
- if !channels.is_empty() {
+ if !(channels.is_empty() && self.channel_editing_state.is_none()) {
self.match_candidates.clear();
self.match_candidates
.extend(
@@ -1291,7 +1291,7 @@ impl CollabPanel {
.with_height(theme.row_height)
.contained()
.with_style(*theme.contact_row.in_state(is_selected).style_for(state))
- .with_margin_left(10. * channel.depth as f32)
+ .with_margin_left(20. * channel.depth as f32)
})
.on_click(MouseButton::Left, move |_, this, cx| {
this.join_channel(channel_id, cx);