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

Fix Issue #259: Prevent isSkeletonActive to be called when isSkeletonable is false #275

Merged
merged 2 commits into from
Mar 13, 2020

Conversation

wsalim1610
Copy link
Contributor

Prevent isSkeletonActive to be called when isSkeletonable is false

isSkeletonActive makes a call to subviewsSkeletonables which in the end will call visibleCells of date picker's internal table view. When this happen at traitCollectionDidChange which somehow happen in some iOS version where the crash happened, the crash may occurs because it is trying to access a certain index of visible cell when actually it has none yet (this happens in the date pciker internally, so I'm not really sure how or why)

The changes I made is to prevent isSkeletonActive to be called when is it clear that the view's isSkeletonable is false. This should prevent the crash and also I think it also better in performance as there is no point in checking isSkeletonActive when it is not skeletonable

@wsalim1610 wsalim1610 changed the title Fix Issue #259: Prevent isSkeletonActive to be called when isSkeletonable is false Fix Issue #259: Prevent `sSkeletonActive to be called when isSkeletonable is false Mar 12, 2020
@wsalim1610 wsalim1610 changed the title Fix Issue #259: Prevent `sSkeletonActive to be called when isSkeletonable is false Fix Issue #259: Prevent isSkeletonActive to be called when isSkeletonable is false Mar 12, 2020
@Juanpe
Copy link
Owner

Juanpe commented Mar 12, 2020

Hi @wsalim1610, please, could you include this PR in the CHANGELOG file? Copy the format of the other bug fixes :)

@wsalim1610
Copy link
Contributor Author

@Juanpe done

@Juanpe
Copy link
Owner

Juanpe commented Mar 13, 2020

thanks :)

@Juanpe Juanpe merged commit ec3398b into Juanpe:develop Mar 13, 2020
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