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

Add safe-guard for reloading without a superview #23

Merged
merged 7 commits into from Nov 5, 2019

Conversation

zenangst
Copy link
Owner

@zenangst zenangst commented Nov 5, 2019

Fixes crash where the view has yet to get a superview.
Instead of running the performBatchUpdates, the implementation
will now invoke reloadData followed by completion?() and return early.

Fixes crash where the view has yet to get a superview.
Instead of running the `performBatchUpdates`, the implementation
will now invoke `updateDataSource` and run the completion.
@zenangst zenangst force-pushed the fix/crash-reloading-without-a-superview branch from 257938e to 62df285 Compare November 5, 2019 17:13
@zenangst zenangst force-pushed the fix/crash-reloading-without-a-superview branch from 62df285 to 02fa93c Compare November 5, 2019 17:13
Use `reloadData` if there is no `superview`
@codecov-io
Copy link

codecov-io commented Nov 5, 2019

Codecov Report

Merging #23 into master will decrease coverage by 3.2%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #23      +/-   ##
=========================================
- Coverage    66.8%   63.6%   -3.21%     
=========================================
  Files           9       9              
  Lines         238     250      +12     
=========================================
  Hits          159     159              
- Misses         79      91      +12
Impacted Files Coverage Δ
Source/iOS+tvOS/UITableView+Extensions.swift 0% <0%> (ø) ⬆️
Source/iOS+tvOS/UICollectionView+Extensions.swift 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ad682df...fa251ba. Read the comment docs.

@zenangst zenangst merged commit da37a6a into master Nov 5, 2019
@zenangst zenangst deleted the fix/crash-reloading-without-a-superview branch November 5, 2019 17:36
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.

None yet

2 participants