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

Load previous page sometimes doesn't work on 7days #46

Closed
kazuooooo opened this issue Jan 22, 2019 · 3 comments
Closed

Load previous page sometimes doesn't work on 7days #46

kazuooooo opened this issue Jan 22, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@kazuooooo
Copy link

kazuooooo commented Jan 22, 2019

Hi, thanks for making awesome library 😄

I found a issue on sample app, which sometimes fail to load previous page on 7days and ScrollType Page Scroll.

I recorded movie below.

img_0183 trim

and my environment is

  • iPhone X(iOS 12.1.2)
  • repo sample app
  • my app settings

img_a8b685442c0f-1

I checked source code and found in loadPagePageScroll method,
currentOffset is not zero (0.333333333) on 7days and do nothing.
(other days are always 0 and loadPrevPage)

    private func loadPagePageScroll() {
        let maximumOffset = collectionView.contentSize.width - collectionView.frame.width
        // currentOffset sometimes 0.3333333333333333
        let currentOffset = collectionView.contentOffset.x

        if maximumOffset <= currentOffset {
            loadNextOrPrevPage(isNext: true)
        }
        if currentOffset <= 0 {
            loadNextOrPrevPage(isNext: false)
        }
    }

It works fine with dirty hack changing

currentOffset <= 1

but it looks other original cause currentOffset is not zero on 7days only.

I couldn't find it by myself, and very glad to help or fix this bug 👍

thanks,

@zjfjack
Copy link
Owner

zjfjack commented Jan 22, 2019

Thanks for reporting this issue.

I find that this issue not only happened in 7days but also in other views and even for loadNextPage, which means changing currentOffset cannot solve this problem.

I think some previous updates might cause this issue and I will fix it as soon as possible.

@kazuooooo
Copy link
Author

@zjfjack
Thank you so much!!

@zjfjack zjfjack added bug Something isn't working working Currently working on this issue labels May 22, 2019
@zjfjack
Copy link
Owner

zjfjack commented May 26, 2019

Hey, mate.

I know it is already 4 months later, but I finally resolve this issue with 0.7.0 version released. It is actually a quite major and difficult problem for the pagination.

You can check the release comment here.

If you have any other issue, let me know. I will close this issue.

Thanks

@zjfjack zjfjack closed this as completed May 26, 2019
@zjfjack zjfjack removed the working Currently working on this issue label May 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants