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

reloadData if diffing before refreshViews if diffing is disabled (#127) #128

Merged
merged 1 commit into from
Aug 20, 2018

Conversation

benasher44
Copy link
Contributor

Cherry-picked from #127

@benasher44 benasher44 added this to the 0.2.0 milestone Aug 16, 2018
@benasher44
Copy link
Contributor Author

The downside to what we did here is that 0.1.2 will not get this patch, which effectively makes it a release we never want to use in PG. Instead, we should make a 0.1.3 that includes this patch, if we decide we want to upgrade to 0.1.2.

@benasher44 benasher44 force-pushed the basher/0.1.1-patch1-cp branch from 69f0a3e to 1071975 Compare August 17, 2018 17:14
@benasher44 benasher44 mentioned this pull request Aug 17, 2018
4 tasks
@benasher44
Copy link
Contributor Author

Superseded by #130

@benasher44 benasher44 closed this Aug 17, 2018
@benasher44 benasher44 deleted the basher/0.1.1-patch1-cp branch August 17, 2018 18:34
@benasher44 benasher44 restored the basher/0.1.1-patch1-cp branch August 20, 2018 17:46
@benasher44
Copy link
Contributor Author

Re-opening, since we ditched #130

@benasher44 benasher44 reopened this Aug 20, 2018
This calls reloadData on self.tableView when diffing is disabled. This ensures that the UITableView is in sync with new data model before attempting to call methods on UITableView that would require the data model to be in sync to get correct results (i.e. cellForRow(at:)). This prevents crashing in cellForRow(at:) when UITableView asks for cells near a user-requested (programmatically), when the data model may not actually have the data for that cell.

(cherry picked from commit eb3bb93)
@benasher44 benasher44 force-pushed the basher/0.1.1-patch1-cp branch from 1071975 to b44c8a6 Compare August 20, 2018 17:47
Copy link

@sasipaants sasipaants left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 💯

@benasher44 benasher44 modified the milestones: 0.2.0, 0.1.3 Aug 20, 2018
@benasher44 benasher44 merged commit f6ad051 into master Aug 20, 2018
@benasher44 benasher44 deleted the basher/0.1.1-patch1-cp branch August 20, 2018 18:09
@benasher44 benasher44 mentioned this pull request Aug 20, 2018
4 tasks
benasher44 added a commit that referenced this pull request Aug 20, 2018
- Updates CHANGELOG to include info about fix from #128
- Updates the podspec
- Makes 0.2.0 the "next" release
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