Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

onMoreAsked is not called after refresh and initial load fits in screen without scroll #98

Open
PepijnK opened this issue Jun 15, 2016 · 2 comments

Comments

@PepijnK
Copy link

PepijnK commented Jun 15, 2016

Hi,

I use the SuperRecyclerView in combination with an adapter that holds different views. This means the adapter is not tied to a list so I don't have many items (5 at max). The first 2 items cover less than the screen. I'm implementing a LoadMoreListener to do lazy fetching of the views which are still outside view-range. It only works when loading everything for the first time:

When I register a MoreListener through setupMoreListener(), the SRV is calling onMoreAsked the very first time. After refreshing, I set a new adapter and resetting the OnLoadListener but now it doesn't trigger onMoreAsked.

@rahul-padmakumar
Copy link

Hi PepijnK,

Have you tried to call "setLoadingMore(false)" before setting new adapter and OnLoadListener.
As per my investigation your issue may be you have created new OnLoadListener and Adapter but you have not reset the "isLoadingMore" flag based on which OnLoadListener decides whether to call onMoreAsked() or not.

@PepijnK
Copy link
Author

PepijnK commented Jun 26, 2016

I assumed that was handled automatically for me once I notify the SRV about
data inserts/modifications. Let me try setting the loading flag manually...
Op 26 jun. 2016 06:24 schreef "rahul-padmakumar" [email protected]:

Hi PepijnK,

Have you tried to call "setLoadingMore(false)" before setting new
adapter and OnLoadListener.
As per my investigation your issue may be you have created new
OnLoadListener and Adapter but you have not reset the "isLoadingMore"
flag based on which OnLoadListener decides whether to call onMoreAsked() or
not.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#98 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ADLJEUHaokr53HHgUWIIOsQPr5UWW4I9ks5qPf75gaJpZM4I2cCu
.

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

No branches or pull requests

2 participants