RxRealmDataSources
RxRealmDataSources copied to clipboard
Data sources rework
This pull request changes iOS RxRealmDataSources implementation slightly to align with and leverage functionality already present in RxCocoa.
interesting! I'll give it a try this week 👌
@icanzilb, one clarification needs to be made - this PR, although done separately, is closely related to another my PR (SectionedViewDataSourceTypeConformance). They both provide full interoperability with RxCocoa-provided mechanisms (and in fact, this PR depends somewhat on previous). Maybe it would have been better to make one bigger pull request, but I wanted to keep scope of changes smaller in each case.
If you accept this PRs, it make sense to provide new release, as they are good improvements to the library. To ease transition, I kept old interfaces, but added deprecation notice. Although some methods signatures changed (realmChanges), already written code like this:
Observable.changes(...)
.bind(to: tableView.rx.realmChanges(dataSource))
.disposed(by: bag)
tableView.rx.realmModelSelected(String.self)
.bind(to: label.rx.title)
.disposed(by: bag)
will compile and continue working (note that realmModelSelected depends on SectionedViewDataSourceTypeConformance).
Hi @icanzilb ! I've updated slightly my long-awaiting PR (combined 2 dependant PRs into one along with small changes to macOS version). Can you please have a look?