Adds FetchTrustedSourcesOperation

This commit is contained in:
Riley Testut
2022-04-14 15:27:57 -07:00
parent e5d66defbc
commit f1f6852ab4
3 changed files with 71 additions and 0 deletions

View File

@@ -394,6 +394,16 @@ extension AppManager
self.run([fetchAppIDsOperation], context: authenticationOperation.context)
}
@discardableResult
func fetchTrustedSources(completionHandler: @escaping (Result<[FetchTrustedSourcesOperation.TrustedSource], Error>) -> Void) -> FetchTrustedSourcesOperation
{
let fetchTrustedSourcesOperation = FetchTrustedSourcesOperation()
fetchTrustedSourcesOperation.resultHandler = completionHandler
self.run([fetchTrustedSourcesOperation], context: nil)
return fetchTrustedSourcesOperation
}
@discardableResult
func install<T: AppProtocol>(_ app: T, presentingViewController: UIViewController?, context: AuthenticatedOperationContext = AuthenticatedOperationContext(), completionHandler: @escaping (Result<InstalledApp, Error>) -> Void) -> RefreshGroup
{