I am looking a way to delay invoke of an Completable function after first Completable is success and all logic is finished.
fun invokeSomeLogic(): Completable {
return firstCompletable() ----> lets assume is success
.concatWith(secondCompletable()) ---> lets assume is success
.concatWith(thirdCompletable()) // THIS IS THE FUNCTION I WANT TO DELAY
.onErrorResumeNext {...}
}
I want to delay the third for 2 sec after the second one is finished with success. When I was debugging and set some breakpoints on third function it seems that third fun is invoked regardless of second fun. Is this a normal behaviour of concatWith? Appreciate any help!