Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about chaining long processes. #13

Open
scottandrew opened this issue Mar 28, 2018 · 1 comment
Open

Question about chaining long processes. #13

scottandrew opened this issue Mar 28, 2018 · 1 comment

Comments

@scottandrew
Copy link

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.

@scottandrew
Copy link
Author

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
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant