java - How can we implement Observable.flatMapCompletable? -


for single can that:

init {     single.just("blah")             .flatmapcompletable { updatelocalization() } }  private fun updatelocalization(): completable {     return textsmanager.getcurrentlocalization()         .doonsuccess {             _localization =             logger.debug("updatelocalization:doonsuccess")         }         .tocompletable() } 

and method observable.flatmapcompletable(completable)? there reason why isn't implemented in rxjava? how can implement on own?

for use completable.await() in observable.onnext:

textsmanager.eventsbus.observe()         .oftype(textsmanager.event.localizationupdated::class.java)         .doonnext { updatelocalization().await() }         .subscribe() 


Comments

Popular posts from this blog

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

laravel - Undefined property: Illuminate\Pagination\LengthAwarePaginator::$id (View: F:\project\resources\views\admin\carousels\index.blade.php) -