Fix borked layout
This commit is contained in:
parent
01d4e711d8
commit
51ceb52931
1 changed files with 45 additions and 56 deletions
|
@ -231,8 +231,7 @@ impl NotificationPanel {
|
||||||
|
|
||||||
Some(
|
Some(
|
||||||
div()
|
div()
|
||||||
.child(
|
.id(ix)
|
||||||
ButtonLike::new(ix)
|
|
||||||
.child(
|
.child(
|
||||||
h_stack()
|
h_stack()
|
||||||
.children(actor.map(|actor| Avatar::new(actor.avatar_uri.clone())))
|
.children(actor.map(|actor| Avatar::new(actor.avatar_uri.clone())))
|
||||||
|
@ -253,11 +252,9 @@ impl NotificationPanel {
|
||||||
} else if needs_response {
|
} else if needs_response {
|
||||||
Some(
|
Some(
|
||||||
h_stack()
|
h_stack()
|
||||||
.child(
|
.child(Button::new("decline", "Decline").on_click(
|
||||||
Button::new("decline", "Decline")
|
{
|
||||||
.on_click({
|
let notification = notification.clone();
|
||||||
let notification =
|
|
||||||
notification.clone();
|
|
||||||
let view = cx.view().clone();
|
let view = cx.view().clone();
|
||||||
move |_, cx| {
|
move |_, cx| {
|
||||||
view.update(cx, |this, cx| {
|
view.update(cx, |this, cx| {
|
||||||
|
@ -268,13 +265,10 @@ impl NotificationPanel {
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}),
|
},
|
||||||
)
|
))
|
||||||
.child(
|
.child(Button::new("accept", "Accept").on_click({
|
||||||
Button::new("accept", "Accept")
|
let notification = notification.clone();
|
||||||
.on_click({
|
|
||||||
let notification =
|
|
||||||
notification.clone();
|
|
||||||
let view = cx.view().clone();
|
let view = cx.view().clone();
|
||||||
move |_, cx| {
|
move |_, cx| {
|
||||||
view.update(cx, |this, cx| {
|
view.update(cx, |this, cx| {
|
||||||
|
@ -285,8 +279,7 @@ impl NotificationPanel {
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}),
|
})),
|
||||||
),
|
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
@ -294,14 +287,10 @@ impl NotificationPanel {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.disabled(!can_navigate)
|
|
||||||
.on_click({
|
.on_click({
|
||||||
let notification = notification.clone();
|
let notification = notification.clone();
|
||||||
cx.listener(move |this, _, cx| {
|
cx.listener(move |this, _, cx| this.did_click_notification(¬ification, cx))
|
||||||
this.did_click_notification(¬ification, cx)
|
|
||||||
})
|
})
|
||||||
}),
|
|
||||||
)
|
|
||||||
.into_any(),
|
.into_any(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue