Updates SourceError.blocked recovery suggestion to list installed/blocked apps

If source is already added, the error message will list all installed apps from the source.

If adding source for first time, the error message will mention exactly which apps have been blocked from the source (if provided).
This commit is contained in:
Riley Testut
2023-05-16 15:39:38 -05:00
parent 6053a075f4
commit fe412a07b6
8 changed files with 202 additions and 86 deletions

View File

@@ -272,7 +272,7 @@ private extension SourcesViewController
let predicate = NSPredicate(format: "%K == %@", #keyPath(Source.identifier), $source.identifier)
if let existingSource = Source.first(satisfying: predicate, in: backgroundContext)
{
throw SourceError.duplicate(source, previousSourceName: existingSource.name)
throw SourceError.duplicate(source, existingSource: existingSource)
}
DispatchQueue.main.async {