visibleDates() no longer improperly returning cell headers #278
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.