Log view name alongside error in ChildView

This commit is contained in:
Antonio Scandurra 2022-10-13 15:40:21 +02:00
parent edb61a9c8f
commit a5a60eb854
29 changed files with 105 additions and 63 deletions

View file

@ -223,7 +223,7 @@ impl CollabTitlebarItem {
.with_children(badge)
.with_children(self.contacts_popover.as_ref().map(|popover| {
Overlay::new(
ChildView::new(popover)
ChildView::new(popover, cx)
.contained()
.with_margin_top(titlebar.height)
.with_margin_left(titlebar.toggle_contacts_button.default.button_width)

View file

@ -32,8 +32,8 @@ impl View for ContactFinder {
"ContactFinder"
}
fn render(&mut self, _: &mut RenderContext<Self>) -> ElementBox {
ChildView::new(self.picker.clone()).boxed()
fn render(&mut self, cx: &mut RenderContext<Self>) -> ElementBox {
ChildView::new(self.picker.clone(), cx).boxed()
}
fn on_focus_in(&mut self, _: AnyViewHandle, cx: &mut ViewContext<Self>) {

View file

@ -1072,7 +1072,7 @@ impl View for ContactList {
.with_child(
Flex::row()
.with_child(
ChildView::new(self.filter_editor.clone())
ChildView::new(self.filter_editor.clone(), cx)
.contained()
.with_style(theme.contact_list.user_query_editor.container)
.flex(1., true)

View file

@ -88,8 +88,8 @@ impl View for ContactsPopover {
fn render(&mut self, cx: &mut RenderContext<Self>) -> ElementBox {
let theme = cx.global::<Settings>().theme.clone();
let child = match &self.child {
Child::ContactList(child) => ChildView::new(child),
Child::ContactFinder(child) => ChildView::new(child),
Child::ContactList(child) => ChildView::new(child, cx),
Child::ContactFinder(child) => ChildView::new(child, cx),
};
MouseEventHandler::<ContactsPopover>::new(0, cx, |_, cx| {