-
-
Notifications
You must be signed in to change notification settings - Fork 493
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
EventHook + RecycledViewPool #1033
Comments
The "Reused" hook itself is working right, and the item is correct, too. However, reused hook contains a reference to old, no-longer-valid Fragment, old Fragment contains a reference to old, no-longer-valid stateful ViewModel, and so on... |
Given this usecase? Would a "quick" fix be to offer an API to remove previously registered event hooks?
FastAdapter/fastadapter/src/main/java/com/mikepenz/fastadapter/utils/EventHookUtil.kt Lines 40 to 41 in 70b1380
So practically you need to clear tags from |
@mikepenz, thank you for getting back to me! Yes, so |
About this issue
Hello! I've recently started to combine a series of consecutive Fragment RecyclerViews with
RecycledViewPool
to bump performance up viaView
pooling. However, it seems like that does not work too well with the FastAdapter EventHook mechanism (onPostCreateViewHolder
is no longer called for "pooled" Views from following Fragments, old, no-longer-valid hooks are being reused (because of tag-based attachment?))Any ideas on how to properly manage that case?
Best regards,
Illia
Details
5.6.0
The text was updated successfully, but these errors were encountered: