Here is my stream:
public Completable changeUserPassword(String oldPass, String newPass){
return firebaseAuthRepositoryType.getCurrentUser()
.flatMapCompletable(fu -> firebaseAuthRepositoryType.reAuthenticateUser(fu,fu.getEmail(),oldPass)
.andThen(firebaseAuthRepositoryType.changeUserPassword(fu, newPass)))
.observeOn(AndroidSchedulers.mainThread());
}
Problem is the function inside andThen() never calls onComplete()? and the stream is "stuck" there. The return type of changeUserPassword() is Completable.
I tried to change out the function inside andThen() to Completable.complete() for debugging purposes but I saw the same behaviour. It still never "completes" and gets stuck in andThen()
Am I missing something here? Any suggestions?
The flow of the stream is supposed to be:
- getcurrentuser(): returns user ->
- reauthuser(user): returns Completable.onComplete() ->
- user.changepass(): returns Completable.complete()->
- return Completable
from function inside andThen() not emitting onComplete()
No comments:
Post a Comment