Skip to content

How to put a Promise into always? #60

@agordeev

Description

@agordeev

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions