mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-14 17:23:25 +01:00
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:
@@ -369,8 +369,8 @@ extension AppManager
|
||||
// sure there isn't already a source with this identifier.
|
||||
let sourceExists = try await fetchedSource.isAdded
|
||||
|
||||
// This is just a sanity check, so pass nil for previousSourceName to keep code simple.
|
||||
guard !sourceExists else { throw SourceError.duplicate(source, previousSourceName: nil) }
|
||||
// This is just a sanity check, so pass nil for existingSource to keep code simple.
|
||||
guard !sourceExists else { throw SourceError.duplicate(source, existingSource: nil) }
|
||||
|
||||
try await context.performAsync {
|
||||
try context.save()
|
||||
@@ -498,7 +498,7 @@ extension AppManager
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
func updateKnownSources(completionHandler: @escaping (Result<([UpdateKnownSourcesOperation.Source], [UpdateKnownSourcesOperation.Source]), Error>) -> Void) -> UpdateKnownSourcesOperation
|
||||
func updateKnownSources(completionHandler: @escaping (Result<([KnownSource], [KnownSource]), Error>) -> Void) -> UpdateKnownSourcesOperation
|
||||
{
|
||||
let updateKnownSourcesOperation = UpdateKnownSourcesOperation()
|
||||
updateKnownSourcesOperation.resultHandler = completionHandler
|
||||
|
||||
Reference in New Issue
Block a user