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

performBatchUpdates method doesn't perform batch updates #29

Open
vldalx opened this issue Oct 15, 2018 · 1 comment
Open

performBatchUpdates method doesn't perform batch updates #29

vldalx opened this issue Oct 15, 2018 · 1 comment

Comments

@vldalx
Copy link

vldalx commented Oct 15, 2018

RxSwiftCommunity/RxDataSources#271 issue relates to this library as well.
The same problem with RxASTableAnimatedDataSource. It performs separately each update from the batch.

for difference in differences {
dataSource.setSections(difference.finalSections)
tableNode.performBatchUpdates(difference, animated: self.animated, animationConfiguration: self.animationConfiguration)
}

public func performBatchUpdates<S>(_ changes: Changeset<S>, animated: Bool, animationConfiguration: RowAnimation) {
self.performBatch(animated: animated, updates: {
_performBatchUpdates(self, changes: changes, animationConfiguration: animationConfiguration)
}, completion: nil)
}

@vldalx
Copy link
Author

vldalx commented Oct 15, 2018

The logic of the code should be similar to

tableNode.performBatchUpdates({
    for difference in differences {
        dataSource.setSections(difference.finalSections)
        _performBatchUpdates(tableNode, changes: difference, animationConfiguration: self.animationConfiguration)
    }
}, completion: nil)

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

No branches or pull requests

1 participant