Stub out add subscription

This commit is contained in:
Maurice Parker 2020-04-04 05:15:43 -05:00
parent adefcc7c3f
commit 79adb1f34a
2 changed files with 14 additions and 3 deletions

View File

@ -187,7 +187,7 @@ final class CloudKitAccountDelegate: AccountDelegate {
return
}
refreshProgress.addToNumberOfTasksAndRemaining(3)
refreshProgress.addToNumberOfTasksAndRemaining(4)
FeedFinder.find(url: url) { result in
self.refreshProgress.completeTask()
@ -216,6 +216,13 @@ final class CloudKitAccountDelegate: AccountDelegate {
feed.externalID = externalID
container.addWebFeed(feed)
self.publicZone.createSubscription(feed) { result in
self.refreshProgress.completeTask()
if case .failure(let error) = result {
os_log(.error, log: self.log, "Restore folder feed error: %@.", error.localizedDescription)
}
}
InitialFeedDownloader.download(url) { parsedFeed in
self.refreshProgress.completeTask()

View File

@ -48,11 +48,15 @@ final class CloudKitPublicZone: CloudKitZone {
func subscribe() {}
func receiveRemoteNotification(userInfo: [AnyHashable : Any], completion: @escaping () -> Void) {
completion()
}
func createSubscription(_ webFeed: WebFeed, completion: @escaping (Result<Void, Error>) -> Void) {
completion(.success(()))
}
func removeSubscription(_ webFeed: WebFeed, completion: @escaping (Result<Void, Error>) -> Void) {
completion(.success(()))
}
}