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

Request: Completable.andThen(Single) #3730

Closed
ghost opened this issue Feb 24, 2016 · 8 comments
Closed

Request: Completable.andThen(Single) #3730

ghost opened this issue Feb 24, 2016 · 8 comments

Comments

@ghost
Copy link

ghost commented Feb 24, 2016

To match Completable#andThen(Observable<T> next) it would be nice if there were an operator like this:

public <T> Single<T> andThen(Single<T> next)
@akarnokd
Copy link
Member

I don't know, do you want the next's value replace the first's value?

@JakeWharton
Copy link
Contributor

There is no first value because the method is on Completable. It's essentially a flatMap.

@akarnokd
Copy link
Member

Right, didn't connect Completable. I don't see any problem with such an overload. PRs are welcome.

@ghost
Copy link
Author

ghost commented Feb 24, 2016

I'll probably give it a go this weekend if no-one else has started.

@stevegury
Copy link
Member

Sounds good, glad to review a PR.

@geralt-encore
Copy link

Will implementation be just like:

    public final <T> Single<T> andThen(Single<T> next) {
        requireNonNull(next);
        return next.toObservable().delaySubscription(toObservable()).toSingle();
    }

Or is it a bad practice to use these wrappers internally?

@akarnokd
Copy link
Member

akarnokd commented Mar 8, 2016

If you took the time and implement this operator directly, that would be great.

@akarnokd
Copy link
Member

akarnokd commented May 5, 2016

Closing via #3799

@akarnokd akarnokd closed this as completed May 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants