RxASDataSources icon indicating copy to clipboard operation
RxASDataSources copied to clipboard

performBatchUpdates method doesn't perform batch updates

Open vldalx opened this issue 7 years ago • 1 comments
trafficstars

RxSwiftCommunity/RxDataSources#271 issue relates to this library as well. The same problem with RxASTableAnimatedDataSource. It performs separately each update from the batch. https://github.com/RxSwiftCommunity/RxASDataSources/blob/8f9e8951a68ca7c56f31ac937aa59c1f1fa85e88/Sources/DataSources/ASTableNode%2BRx/RxASTableAnimatedDataSource.swift#L138-L141 https://github.com/RxSwiftCommunity/RxASDataSources/blob/8f9e8951a68ca7c56f31ac937aa59c1f1fa85e88/Sources/DataSources/ASTableNode%2BRx/ASTableNode%2BSectionedViewType.swift#L47-L51

vldalx avatar Oct 15 '18 13:10 vldalx

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)

vldalx avatar Oct 15 '18 13:10 vldalx