Fix a few bugs in how channels are moved around

This commit is contained in:
Mikayla Maki 2023-08-01 18:42:14 -07:00
parent 6a404dfe31
commit 7145f47454
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View file

@ -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()),
});
}

View file

@ -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);