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

visibleDates() no longer improperly returning cell headers #278

Conversation

KyleConway
Copy link
Contributor

@KyleConway KyleConway commented Feb 1, 2017

There is a public facing visibleDates() func within UserInteractionFunctions which has purpose "Returns the visible dates of the calendar."

However, the current implementation is using ALL visible elements of the calendar view to build the valid visible dates array - it is not filtering out header views. What this means is that the visible headers in view are also creating a "valid" index path and resulting date in the final returned array.

For example, if section header for section 1 is visible on screen, then index path [1, 0] will be added to the array along with index path for the first cell in section 1 which is also [1, 0]. The final array will show repeated dates for instances like this. This is just one example of the trouble this bug is creating. visibleElements() should be updated to visibleElements(excludeHeaders: true) for the func to perform its operation correctly.

@patchthecode
Copy link
Owner

Seems you are finding some good things I have missed. 😄
Thanks you so much. Your code makes sense. I think i missed this.

@patchthecode patchthecode merged commit c05209b into patchthecode:master Feb 1, 2017
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.

2 participants