mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-08 22:33:26 +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:
@@ -118,40 +118,3 @@ public extension UserDefaults
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public extension UserDefaults
|
||||
{
|
||||
// Cache trustedSourceIDs just in case we need to check whether source is trusted or not.
|
||||
@nonobjc var trustedSourceIDs: Set<String>? {
|
||||
get {
|
||||
guard let sourceIDs = _trustedSourceIDs else { return nil }
|
||||
return Set(sourceIDs)
|
||||
}
|
||||
set {
|
||||
_trustedSourceIDs = newValue?.map { $0 }
|
||||
}
|
||||
}
|
||||
@NSManaged @objc(trustedSourceIDs) private var _trustedSourceIDs: [String]?
|
||||
|
||||
@nonobjc var blockedSourceIDs: Set<String>? {
|
||||
get {
|
||||
guard let sourceIDs = _blockedSourceIDs else { return nil }
|
||||
return Set(sourceIDs)
|
||||
}
|
||||
set {
|
||||
_blockedSourceIDs = newValue?.map { $0 }
|
||||
}
|
||||
}
|
||||
@NSManaged @objc(blockedSourceIDs) private var _blockedSourceIDs: [String]?
|
||||
|
||||
@nonobjc var blockedSourceURLs: Set<URL>? {
|
||||
get {
|
||||
guard let sourceURLs = _blockedSourceURLs?.compactMap({ URL(string: $0) }) else { return nil }
|
||||
return Set(sourceURLs)
|
||||
}
|
||||
set {
|
||||
_blockedSourceURLs = newValue?.map { $0.absoluteString }
|
||||
}
|
||||
}
|
||||
@NSManaged @objc(blockedSourceURLs) private var _blockedSourceURLs: [String]?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user