Wire up offline contact list (#3700)
This PR wires up the offline contact list. Also enables toggling both the online and offline contact lists. Release Notes: - N/A
This commit is contained in:
parent
d058515b81
commit
4fdf6a867a
1 changed files with 8 additions and 12 deletions
|
@ -2230,15 +2230,17 @@ impl CollabPanel {
|
||||||
| Section::Offline => true,
|
| Section::Offline => true,
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut row = h_stack()
|
h_stack()
|
||||||
.w_full()
|
.w_full()
|
||||||
.group("section-header")
|
.group("section-header")
|
||||||
.child(
|
.child(
|
||||||
ListHeader::new(text)
|
ListHeader::new(text)
|
||||||
.toggle(if can_collapse {
|
.when(can_collapse, |header| {
|
||||||
Some(!is_collapsed)
|
header.toggle(Some(!is_collapsed)).on_toggle(cx.listener(
|
||||||
} else {
|
move |this, event, cx| {
|
||||||
None
|
this.toggle_section_expanded(section, cx);
|
||||||
|
},
|
||||||
|
))
|
||||||
})
|
})
|
||||||
.inset(true)
|
.inset(true)
|
||||||
.end_slot::<AnyElement>(button)
|
.end_slot::<AnyElement>(button)
|
||||||
|
@ -2253,13 +2255,7 @@ impl CollabPanel {
|
||||||
})
|
})
|
||||||
.detach_and_log_err(cx)
|
.detach_and_log_err(cx)
|
||||||
}))
|
}))
|
||||||
});
|
})
|
||||||
|
|
||||||
if section == Section::Offline {
|
|
||||||
row = div().border_1().border_color(gpui::red()).child(row);
|
|
||||||
}
|
|
||||||
|
|
||||||
row
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn render_contact(
|
fn render_contact(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue