Skip to content

Remove publishLast, publish(initialValue)? #1785

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

Closed
benjchristensen opened this issue Oct 23, 2014 · 2 comments
Closed

Remove publishLast, publish(initialValue)? #1785

benjchristensen opened this issue Oct 23, 2014 · 2 comments
Milestone

Comments

@benjchristensen
Copy link
Member

Should we remove the publishLast and publish(initialValue) methods?

They are easily handled by composing takeLast and concat with publish.

/cc @headinthebox

They don't need AsyncSubject or BehaviorSubject with multicast to work:

    public final ConnectableObservable<T> publishLast() {
        return takeLast(1).publish();
    }

    public final ConnectableObservable<T> publish(final T initialValue) {
        return concatWith(just(initialValue)).publish();
    }

Prior to #1779 they were using multicast with subjects.

@benjchristensen benjchristensen added this to the 1.0 milestone Oct 23, 2014
benjchristensen added a commit to benjchristensen/RxJava that referenced this issue Oct 23, 2014
@benjchristensen
Copy link
Member Author

Pull request if we agree -> #1788

@benjchristensen
Copy link
Member Author

@headinthebox and I reviewed and agreed. The methods are removed.

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

No branches or pull requests

1 participant