RxDataSources
RxDataSources copied to clipboard
RxTableViewSectionedAnimatedDataSource dataSource sectionModels are always same with newSections
I have been debugging an issue where cell viewModel gets updated but cell reloading doesn't happen until user manually scrolls cell off screen.
I have verified that IdentifiableType and Equatable are implemented correctly and cellModel properties do get updated, however oldSections and newSections in tableView(_ tableView: UITableView, observedEvent: Event<Element>) are always same, because of this lhs and rhs are always same for all items. I don't understand how dataSource.sectionModels are updated before even diff happens
Observable.combineLatest inside getDashboardItemsAsObservable() to create AnimatableSectionModel(model: "some", items: cellViewModels)
viewModel.getDashboardItemsAsObservable()
.asDriver(onErrorJustReturn: [])
.debug()
.do(onNext: { [weak self] (sectionModel) in
//
})
.drive(tableView.rx.items(dataSource: viewModel.dataSource))
.disposed(by: disposeBag)
Any help is appreciated!