Skip to content
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

feat: Add aggregate visibility state changed callback #1385

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shinwan2
Copy link

@shinwan2 shinwan2 commented Jun 7, 2024

To fix #1343, I believe a new callback that reports the latest visibility state(s) for that EpoxyVisibilityItem should be introduced. Without this aggregate information, client will need to somehow batch the VisibilityState by themselves for 1 vi.update cycle. To avoid object allocation, instead of using data class AggregateVisibilityState I just expose the properties from EpoxyVisibilityItem as read-only.

Alternatively to fix #1343, we could change the ordering of VisibilityState emission on onVisibilityStateChanged. Please let me know if that's preferred.

Test

I have included comparing the aggregate visibility state in EpoxyVisibilityStateTrackerTest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some VisibilityStates should not be emitted after INVISIBLE
1 participant