-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use LazyListUpdateProcessor for Android views #1570
Conversation
@@ -250,15 +250,13 @@ internal class LazyListContainerCell( | |||
|
|||
// Unbind the cell when its view is detached from the table. | |||
if (superview != null && newSuperview == null) { | |||
removeAllSubviews() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now performed by unbind()
below.
} else if (holder.container.height == 0) { | ||
// This occurs when the ViewHolder has been freshly created, so we set the container | ||
// to a non-zero height so that it's visible. | ||
holder.itemView.updateLayoutParams { height = lastItemHeight } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big regression here . . . I need to add a hook to create placeholders on-demand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tracking here: #1571
} | ||
|
||
private class FakeWindowedLazyList : WindowedLazyList<WidgetValue>(NoOpListUpdateCallback) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously we used the compose-side LazyList to drive this on the widget-side.
With FakeProcessor we’ve got a test facet for the widget side and I don’t think this integration test is necessary.
// This incorrectly updates the viewport, which then shifts the loaded items window. | ||
// This then increases the value of itemsBefore, | ||
// and the cycle continues until the backing dataset is exhausted. | ||
adapter.notifyDataSetChanged() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
75d3d4f
to
f08c6e0
Compare
lazylist.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't say I fully understood everything, but LGTM
f08c6e0
to
1cbcff1
Compare
Closes: #1552