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

Add more operator overloading to Observable and CompositeDisposable #234

Open
wants to merge 4 commits into
base: 3.x
Choose a base branch
from

Conversation

WendyYanto
Copy link

In this pull request, I'm proposing to add features in RxKotlin :

  1. By using minusAssign operator, we can delete disposable from CompositeDisposable.
// Current
compositeDisposable.delete(disposable)
// Propose
compositeDisposable -= disposable
  1. By using plus operator, we can merge Observable without calling Observable.merge explicitly. These features also support us to merge more than 4 observable because java Observable.merge() function overloads only to maximum of 4 observables.
// Current
val observable = Observable.merge(source1, source2, source3)
// Propose
val observable = source1 + source2 + source3
  1. Add unit tests to previous plusAssign in CompositeDisposable

Copy link

@isfaaghyth isfaaghyth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting!

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

Successfully merging this pull request may close these issues.

2 participants