Merge pull request #1258 from kielgillard/master
Fixes an issue where sending article statuses to Feedly…
This commit is contained in:
commit
c590e2d136
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -24,9 +24,8 @@ final class FeedlySendArticleStatusesOperation: FeedlyOperation {
|
|||
}
|
||||
|
||||
override func main() {
|
||||
defer { didFinish() }
|
||||
|
||||
guard !isCancelled else {
|
||||
didFinish()
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -27,9 +27,8 @@ final class FeedlySetStarredArticlesOperation: FeedlyOperation {
|
|||
}
|
||||
|
||||
override func main() {
|
||||
defer { didFinish() }
|
||||
|
||||
guard !isCancelled else {
|
||||
didFinish()
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -102,6 +102,7 @@ final class FeedlySyncAllOperation: FeedlyOperation {
|
|||
|
||||
override func main() {
|
||||
guard !isCancelled else {
|
||||
// override of cancel calls didFinish().
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue