Merge pull request #1758 from kielgillard/ios-candidate
Log failures attempting to add new feeds to a Feedly account…
This commit is contained in:
commit
2f9506a8b8
|
@ -84,6 +84,7 @@ class FeedlyAddNewFeedOperation: FeedlyOperation, FeedlyOperationDelegate, Feedl
|
||||||
operationQueue.addOperation(addRequest)
|
operationQueue.addOperation(addRequest)
|
||||||
|
|
||||||
let createFeeds = FeedlyCreateFeedsForCollectionFoldersOperation(account: account, feedsAndFoldersProvider: addRequest, log: log)
|
let createFeeds = FeedlyCreateFeedsForCollectionFoldersOperation(account: account, feedsAndFoldersProvider: addRequest, log: log)
|
||||||
|
createFeeds.delegate = self
|
||||||
createFeeds.addDependency(addRequest)
|
createFeeds.addDependency(addRequest)
|
||||||
createFeeds.downloadProgress = downloadProgress
|
createFeeds.downloadProgress = downloadProgress
|
||||||
operationQueue.addOperation(createFeeds)
|
operationQueue.addOperation(createFeeds)
|
||||||
|
@ -91,17 +92,20 @@ class FeedlyAddNewFeedOperation: FeedlyOperation, FeedlyOperationDelegate, Feedl
|
||||||
let syncUnread = FeedlyIngestUnreadArticleIdsOperation(account: account, credentials: credentials, service: syncUnreadIdsService, database: database, newerThan: nil, log: log)
|
let syncUnread = FeedlyIngestUnreadArticleIdsOperation(account: account, credentials: credentials, service: syncUnreadIdsService, database: database, newerThan: nil, log: log)
|
||||||
syncUnread.addDependency(createFeeds)
|
syncUnread.addDependency(createFeeds)
|
||||||
syncUnread.downloadProgress = downloadProgress
|
syncUnread.downloadProgress = downloadProgress
|
||||||
|
syncUnread.delegate = self
|
||||||
operationQueue.addOperation(syncUnread)
|
operationQueue.addOperation(syncUnread)
|
||||||
|
|
||||||
let syncFeed = FeedlySyncStreamContentsOperation(account: account, resource: feedResourceId, service: getStreamContentsService, isPagingEnabled: false, newerThan: nil, log: log)
|
let syncFeed = FeedlySyncStreamContentsOperation(account: account, resource: feedResourceId, service: getStreamContentsService, isPagingEnabled: false, newerThan: nil, log: log)
|
||||||
syncFeed.addDependency(syncUnread)
|
syncFeed.addDependency(syncUnread)
|
||||||
syncFeed.downloadProgress = downloadProgress
|
syncFeed.downloadProgress = downloadProgress
|
||||||
|
syncFeed.delegate = self
|
||||||
operationQueue.addOperation(syncFeed)
|
operationQueue.addOperation(syncFeed)
|
||||||
|
|
||||||
let finishOperation = FeedlyCheckpointOperation()
|
let finishOperation = FeedlyCheckpointOperation()
|
||||||
finishOperation.checkpointDelegate = self
|
finishOperation.checkpointDelegate = self
|
||||||
finishOperation.downloadProgress = downloadProgress
|
finishOperation.downloadProgress = downloadProgress
|
||||||
finishOperation.addDependency(syncFeed)
|
finishOperation.addDependency(syncFeed)
|
||||||
|
finishOperation.delegate = self
|
||||||
operationQueue.addOperation(finishOperation)
|
operationQueue.addOperation(finishOperation)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,6 +113,8 @@ class FeedlyAddNewFeedOperation: FeedlyOperation, FeedlyOperationDelegate, Feedl
|
||||||
addCompletionHandler?(.failure(error))
|
addCompletionHandler?(.failure(error))
|
||||||
addCompletionHandler = nil
|
addCompletionHandler = nil
|
||||||
|
|
||||||
|
os_log(.debug, log: log, "Unable to add new feed: %{public}@.", error as NSError)
|
||||||
|
|
||||||
cancel()
|
cancel()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue