Use children instead of when

This commit is contained in:
Marshall Bowers 2023-10-20 16:30:52 -04:00
parent 080638216a
commit cbdd1d6d6c

View file

@ -514,9 +514,11 @@ impl<S: 'static + Send + Sync> ListDetailsEntry<S> {
.w_full() .w_full()
.line_height(relative(1.2)) .line_height(relative(1.2))
.child(Label::new(self.label.clone()).color(label_color)) .child(Label::new(self.label.clone()).color(label_color))
.when(self.meta.is_some(), |this| { .children(
this.child(Label::new(self.meta.clone().unwrap()).color(LabelColor::Muted)) self.meta
}) .take()
.map(|meta| Label::new(meta).color(LabelColor::Muted)),
)
.child( .child(
h_stack().gap_1().justify_end().children( h_stack().gap_1().justify_end().children(
self.actions self.actions