gpui: Simplify uniform list API by removing entity param (#32480)
This PR also introduces `Context::processor`, a sibling of `Context::listener` that takes a strong pointer to entity and allows for a return result. Release Notes: - N/A Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
c55630889a
commit
f567bb52ff
17 changed files with 80 additions and 77 deletions
|
@ -1477,18 +1477,12 @@ impl Render for ExtensionsPage {
|
|||
return this.py_4().child(self.render_empty_state(cx));
|
||||
}
|
||||
|
||||
let extensions_page = cx.entity().clone();
|
||||
let scroll_handle = self.list.clone();
|
||||
this.child(
|
||||
uniform_list(
|
||||
extensions_page,
|
||||
"entries",
|
||||
count,
|
||||
Self::render_extensions,
|
||||
)
|
||||
.flex_grow()
|
||||
.pb_4()
|
||||
.track_scroll(scroll_handle),
|
||||
uniform_list("entries", count, cx.processor(Self::render_extensions))
|
||||
.flex_grow()
|
||||
.pb_4()
|
||||
.track_scroll(scroll_handle),
|
||||
)
|
||||
.child(
|
||||
div()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue