Supports blocking third-party sources

Blocked sources cannot be added by new users, or updated for existing users.
This commit is contained in:
Riley Testut
2023-05-15 16:25:25 -05:00
committed by Magesh K
parent b9dd6432a1
commit 254a9773ec
7 changed files with 151 additions and 23 deletions

View File

@@ -498,13 +498,13 @@ extension AppManager
}
@discardableResult
func fetchTrustedSources(completionHandler: @escaping (Result<[FetchTrustedSourcesOperation.TrustedSource], Error>) -> Void) -> FetchTrustedSourcesOperation
func updateKnownSources(completionHandler: @escaping (Result<([UpdateKnownSourcesOperation.Source], [UpdateKnownSourcesOperation.Source]), Error>) -> Void) -> UpdateKnownSourcesOperation
{
let fetchTrustedSourcesOperation = FetchTrustedSourcesOperation()
fetchTrustedSourcesOperation.resultHandler = completionHandler
self.run([fetchTrustedSourcesOperation], context: nil)
let updateKnownSourcesOperation = UpdateKnownSourcesOperation()
updateKnownSourcesOperation.resultHandler = completionHandler
self.run([updateKnownSourcesOperation], context: nil)
return fetchTrustedSourcesOperation
return updateKnownSourcesOperation
}
func updatePatronsIfNeeded()