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

How to put a Promise into always? #60

Open
agordeev opened this issue Dec 4, 2017 · 0 comments
Open

How to put a Promise into always? #60

agordeev opened this issue Dec 4, 2017 · 0 comments

Comments

@agordeev
Copy link

agordeev commented Dec 4, 2017

Hey guys, first of all thank you very much for this great library!

I have dismissActivityIndicator method, which returns a promise:

func dismissActivityIndicator<T>(any: T) -> Promise<T> {
    return Promise<T> { resolve, _, _ in
        KVNProgress.dismissAnyway {
            resolve(any)
        }
    }
}

My question is how can I inject it into the promise chain, so it is always executed at end? It's fairy simple with always and a plain non-async method, but how to achieve the same result with the method returning a Promise?

help wanted would be an appropiate tag for this question, as this is not an issue :)

@agordeev agordeev changed the title How to put a Promise into always How to put a Promise into always? Dec 4, 2017
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