Fix borked layout

This commit is contained in:
Julia 2023-12-12 17:22:49 -05:00
parent 01d4e711d8
commit 51ceb52931

View file

@ -231,8 +231,7 @@ impl NotificationPanel {
Some(
div()
.child(
ButtonLike::new(ix)
.id(ix)
.child(
h_stack()
.children(actor.map(|actor| Avatar::new(actor.avatar_uri.clone())))
@ -253,11 +252,9 @@ impl NotificationPanel {
} else if needs_response {
Some(
h_stack()
.child(
Button::new("decline", "Decline")
.on_click({
let notification =
notification.clone();
.child(Button::new("decline", "Decline").on_click(
{
let notification = notification.clone();
let view = cx.view().clone();
move |_, cx| {
view.update(cx, |this, cx| {
@ -268,13 +265,10 @@ impl NotificationPanel {
)
});
}
}),
)
.child(
Button::new("accept", "Accept")
.on_click({
let notification =
notification.clone();
},
))
.child(Button::new("accept", "Accept").on_click({
let notification = notification.clone();
let view = cx.view().clone();
move |_, cx| {
view.update(cx, |this, cx| {
@ -285,8 +279,7 @@ impl NotificationPanel {
)
});
}
}),
),
})),
)
} else {
None
@ -294,14 +287,10 @@ impl NotificationPanel {
),
),
)
.disabled(!can_navigate)
.on_click({
let notification = notification.clone();
cx.listener(move |this, _, cx| {
this.did_click_notification(&notification, cx)
cx.listener(move |this, _, cx| this.did_click_notification(&notification, cx))
})
}),
)
.into_any(),
)
}