Hydra
Hydra copied to clipboard
How to put a Promise into always?
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 :)