-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Use DifferenceKit #12
Conversation
muukii
commented
Aug 7, 2018
•
edited
Loading
edited
- Implement
- Update Readme
|
In shuffle
|
Thanks @muukii See also here |
Also, in |
@ra1028 |
In addition, separating |
@muukii for changeset in stagedChangeset {
self.adapter.performBatch(
animated: animated,
updates: {
if !changeset.elementDeleted.isEmpty {
_adapter.deleteItems(at: changeset.elementDeleted.map { IndexPath(item: $0.element, section: $0.section) })
}
if !changeset.elementInserted.isEmpty {
_adapter.insertItems(at: changeset.elementInserted.map { IndexPath(item: $0.element, section: $0.section) })
}
if !changeset.elementUpdated.isEmpty {
_adapter.reloadItems(at: changeset.elementUpdated.map { IndexPath(item: $0.element, section: $0.section) })
}
for (source, target) in changeset.elementMoved {
_adapter.moveItem(
at: IndexPath(item: source.element, section: source.section),
to: IndexPath(item: target.element, section: target.section)
)
}
})
} |
However, DifferenceKit is now on alpha release, and the API continues to change. |
768e4ad
to
1f04426
Compare
bdfc14e
to
4ff5eeb
Compare
Almost done. |