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

forget to calculate loadmore item count #11

Open
HelloVass opened this issue Jul 8, 2018 · 3 comments
Open

forget to calculate loadmore item count #11

HelloVass opened this issue Jul 8, 2018 · 3 comments
Labels
research needed This question should be checked, but so far I do not have time. I will definitely return to this iss

Comments

@HelloVass
Copy link

HelloVass commented Jul 8, 2018

when I add code in your MianActivitylike :

 @Override
    protected void onPostCreate(@Nullable Bundle savedInstanceState) {
        super.onPostCreate(savedInstanceState);

        new Handler().postDelayed(() -> mainActivityPresenter.addItems(), 500);
    }

notice,it‘s a async action,now recyclerview only have one child(loadmore item), so it will cause load more twice,becase your code didn't calculcate loadmore item count(1)

@HelloVass HelloVass changed the title #Bug forget to calculate loadmore item count forget to calculate loadmore item count Jul 8, 2018
@NoNews NoNews added the research needed This question should be checked, but so far I do not have time. I will definitely return to this iss label Aug 2, 2018
@NoNews
Copy link
Owner

NoNews commented Aug 2, 2018

Hi @HelloVass thank you for this issue and sorry for late answer.

Yes, I have made a mistake in sample. Will fix it, thank you.
For this situation, it is very important to don't forget call a method showLoading(true);
It's block method onLoadMore();, until you call showLoading(false);

@HelloVass
Copy link
Author

@NoNews thanks for your response,I have refacrored your NoPaginate with kotlin.I hope you don't mind.If you are interested, here is the link.I use it for my project,and it solved my problem,thanks again.

@NoNews
Copy link
Owner

NoNews commented Aug 5, 2018

@HelloVass Sure, I don't mind.
I also thinking about Kotlin, your repo will be very useful, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
research needed This question should be checked, but so far I do not have time. I will definitely return to this iss
Projects
None yet
Development

No branches or pull requests

2 participants