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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ Each provide default values for `diffingKey`, but you can customize them for you

- Automatic diffing for collection views with multiple sections currently fails (crashes) and possibly won't work in other scenarios. (Thus, the reason why auto-diffing is now `false` for `CollectionViewDriver`.) This will be fixed in the next release. Tracking at [#126](https://github.com/plangrid/ReactiveLists/pull/126).

0.1.1-patch1
-----

### Fixed

- Fix edge case reloading bug when reloading a table view with diffing disabled

0.1.1
-----

Expand Down
4 changes: 4 additions & 0 deletions Sources/TableViewDriver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ open class TableViewDriver: NSObject {
self.refreshViews()
}
} else {
// We need to call reloadData here to ensure UITableView is in-sync with the data source before we start
// making calls to access visible cells. In the automatic diffing case, this is handled by calls to
// beginUpdates() endUpdates()
self.tableView.reloadData()
self.refreshViews()
}
}
Expand Down