gpui: Replace redundant code in animation (#19273)
Just a small change to replace some redundant code in the animation element. Release Notes: - N/A
This commit is contained in:
parent
7a5003bea2
commit
879a2ea06f
1 changed files with 1 additions and 8 deletions
|
@ -133,14 +133,7 @@ impl<E: IntoElement + 'static> Element for AnimationElement<E> {
|
|||
let mut element = (self.animator)(element, delta).into_any_element();
|
||||
|
||||
if !done {
|
||||
let parent_id = cx.parent_view_id();
|
||||
cx.on_next_frame(move |cx| {
|
||||
if let Some(parent_id) = parent_id {
|
||||
cx.notify(parent_id)
|
||||
} else {
|
||||
cx.refresh()
|
||||
}
|
||||
})
|
||||
cx.request_animation_frame();
|
||||
}
|
||||
|
||||
((element.request_layout(cx), element), state)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue