Update to the latest RSCore. Fixes #2914

This commit is contained in:
Maurice Parker 2021-03-24 16:42:53 -05:00
parent 024a8138bb
commit 064463e892
3 changed files with 9 additions and 9 deletions

View File

@ -199,7 +199,7 @@ final class CloudKitAccountDelegate: AccountDelegate {
completion(.success(()))
case .failure(let error):
switch error {
case CloudKitZoneError.invalidParameter:
case CloudKitZoneError.corruptAccount:
// We got into a bad state and should remove the feed to clear up the bad data
account.clearWebFeedMetadata(feed)
container.removeWebFeed(feed)

View File

@ -103,7 +103,7 @@ final class CloudKitAccountZone: CloudKitZone {
}
guard let containerExternalID = container.externalID else {
completion(.failure(CloudKitZoneError.invalidParameter))
completion(.failure(CloudKitZoneError.corruptAccount))
return
}
record[CloudKitWebFeed.Fields.containerExternalIDs] = [containerExternalID]
@ -121,7 +121,7 @@ final class CloudKitAccountZone: CloudKitZone {
/// Rename the given web feed
func renameWebFeed(_ webFeed: WebFeed, editedName: String?, completion: @escaping (Result<Void, Error>) -> Void) {
guard let externalID = webFeed.externalID else {
completion(.failure(CloudKitZoneError.invalidParameter))
completion(.failure(CloudKitZoneError.corruptAccount))
return
}
@ -142,7 +142,7 @@ final class CloudKitAccountZone: CloudKitZone {
/// Removes a web feed from a container and optionally deletes it, calling the completion with true if deleted
func removeWebFeed(_ webFeed: WebFeed, from: Container, completion: @escaping (Result<Bool, Error>) -> Void) {
guard let fromContainerExternalID = from.externalID else {
completion(.failure(CloudKitZoneError.invalidParameter))
completion(.failure(CloudKitZoneError.corruptAccount))
return
}
@ -187,7 +187,7 @@ final class CloudKitAccountZone: CloudKitZone {
func moveWebFeed(_ webFeed: WebFeed, from: Container, to: Container, completion: @escaping (Result<Void, Error>) -> Void) {
guard let fromContainerExternalID = from.externalID, let toContainerExternalID = to.externalID else {
completion(.failure(CloudKitZoneError.invalidParameter))
completion(.failure(CloudKitZoneError.corruptAccount))
return
}
@ -209,7 +209,7 @@ final class CloudKitAccountZone: CloudKitZone {
func addWebFeed(_ webFeed: WebFeed, to: Container, completion: @escaping (Result<Void, Error>) -> Void) {
guard let toContainerExternalID = to.externalID else {
completion(.failure(CloudKitZoneError.invalidParameter))
completion(.failure(CloudKitZoneError.corruptAccount))
return
}
@ -292,7 +292,7 @@ final class CloudKitAccountZone: CloudKitZone {
func renameFolder(_ folder: Folder, to name: String, completion: @escaping (Result<Void, Error>) -> Void) {
guard let externalID = folder.externalID else {
completion(.failure(CloudKitZoneError.invalidParameter))
completion(.failure(CloudKitZoneError.corruptAccount))
return
}

View File

@ -60,8 +60,8 @@
"repositoryURL": "https://github.com/Ranchero-Software/RSCore.git",
"state": {
"branch": null,
"revision": "09bdc9af601af2ca6a3a72a8b3c6aec04dfdbd88",
"version": "1.0.4"
"revision": "665319af9428455e45c1d043156db85548b73f31",
"version": "1.0.5"
}
},
{