RxRealmDataSources icon indicating copy to clipboard operation
RxRealmDataSources copied to clipboard

Data sources rework

Open Granfalloner opened this issue 7 years ago • 3 comments

This pull request changes iOS RxRealmDataSources implementation slightly to align with and leverage functionality already present in RxCocoa.

Granfalloner avatar Feb 17 '18 11:02 Granfalloner

interesting! I'll give it a try this week 👌

icanzilb avatar Feb 19 '18 08:02 icanzilb

@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).

Granfalloner avatar Feb 25 '18 12:02 Granfalloner

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?

Granfalloner avatar Nov 15 '18 09:11 Granfalloner