我需要在链中调用一个可完成的方法,完成后,它需要使用 Map
运算符继续链
示例
Single.just(someOperation())
.flatMapCompletable{
completableMethod()
}
.map{ // i need to continue here with map or some other operator
doSomeOperation()
}
谁能帮我解决这个问题?
最佳答案
Completable
不提交任何数据。因此,您不能调用 map
。如果您想在此之后执行任何操作,请使用 andThen
Single.just(someOperation())
.flatMapCompletable{
completableMethod()
}
.andThen{
doSomeOperation()
}
关于android - 将 Rxjava Completable 转换为 Map,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57132058/