Skip to content

2.x: FlatMap Observable with a Single #4635

Closed
@vanniktech

Description

@vanniktech

Often times I have an Observable and want to flatMap all values with a Single.

Imagine having Single<Photo> getPhoto(int user)

if I wanted to flatMap it with an Observable it would look like this:

Observable.range(1, 100).flatMap(user -> getPhoto(user).toObservable())

It does the job however the Single always needs to be converted to an Observable. Are you guys open for a flatMap version which takes a Single or is there any way around this already without the need to convert the Single to an Observable?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions