We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Working on collections/changesets I found a possible issue:
case .next(let element): let newCollection = element if let collection = collection { let diff = generateDiff(collection, newCollection) observer.receive(OrderedCollectionChangeset(collection: newCollection, patch: [], diff: diff)) } else { observer.receive(OrderedCollectionChangeset(collection: newCollection, patch: [])) } collection = newCollection
Line:
observer.receive(OrderedCollectionChangeset(collection: newCollection, patch: [], diff: diff))
I think this is a mistake. You shouldn't pass patch option there. Then this patch will be used here:
open func apply(changeset: Changeset) { guard let tableView = tableView else { return } let patch = changeset.patch if patch.isEmpty { collection = clone(changeset.collection) tableView.reloadData() } else { tableView.beginUpdates() patch.forEach(apply) tableView.endUpdates() } }
And as far as it's empty it always reloadData.
The text was updated successfully, but these errors were encountered:
Good catch 👍
Sorry, something went wrong.
Fixed in #654
How about removing the constructor which accepts both arguments:
public init(collection: Collection, patch: [Operation], diff: Diff) { self.collection = collection self.precalculatedPatch = patch self.precalculatedDiff = diff }
No branches or pull requests
Working on collections/changesets I found a possible issue:
Line:
I think this is a mistake. You shouldn't pass patch option there.
Then this patch will be used here:
And as far as it's empty it always reloadData.
The text was updated successfully, but these errors were encountered: