RxJava toList – completes only after onComplete is called

 mGetActiveHubUpdatesInteractor.getActiveHubUpdates()
                .filter(Optional::isPresent)
                .firstOrError()
                .map(Optional::get)
                .flatMap(activeHub ->
                        mGetActiveHubEventsInteractor.getActiveHubEvents(activeHub, startTime,
                                endTime))
                .flattenAsObservable(list -> list)
                .map(mActiveHubEventUiMapper::toUiActiveHubEvent)
                .toList()
                .subscribe(this::populateEvents, this::handleError);
Continue reading “RxJava toList – completes only after onComplete is called”