Merge pull request #1258 from kielgillard/master

Fixes an issue where sending article statuses to Feedly…
This commit is contained in:
Maurice Parker 2019-11-05 19:13:46 -06:00 committed by GitHub
commit c590e2d136
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 4 deletions

View File

@ -20,12 +20,14 @@ class FeedlyOperation: Operation {
func didFinish() {
assert(Thread.isMainThread)
assert(!isFinished, "Finished operation is attempting to finish again.")
self.isExecutingOperation = false
self.isFinishedOperation = true
}
func didFinish(_ error: Error) {
assert(Thread.isMainThread)
assert(!isFinished, "Finished operation is attempting to finish again.")
delegate?.feedlyOperation(self, didFailWith: error)
didFinish()
}

View File

@ -24,9 +24,8 @@ final class FeedlySendArticleStatusesOperation: FeedlyOperation {
}
override func main() {
defer { didFinish() }
guard !isCancelled else {
didFinish()
return
}

View File

@ -27,9 +27,8 @@ final class FeedlySetStarredArticlesOperation: FeedlyOperation {
}
override func main() {
defer { didFinish() }
guard !isCancelled else {
didFinish()
return
}

View File

@ -102,6 +102,7 @@ final class FeedlySyncAllOperation: FeedlyOperation {
override func main() {
guard !isCancelled else {
// override of cancel calls didFinish().
return
}