kovenant
kovenant copied to clipboard
Question about chaining long processes.
I was trying to chain long processes but it wasn't working. All the long processes were returning deferredPromises.
I thought this was working not too long ago but the update to AndroidStudio 3.1 seems to have broken something. I was seeing pending promises fall through. It was something like.
renewToken() then { getData() } successUI { broadcast update }
The broad cast update was happening while getData was pending. I have worked around by doing:
all(renewToken(), getData()) successUI { }
It appears though that the then is not working at all. Its just falling through. I had another case where this was falling through when trying to log out then show login screen when logout was complete.
Figured this out. I used bind and that did what I wanted to do. I can do things like
refreshToken bind { getData() } success { broadcast update }