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() {
|
func didFinish() {
|
||||||
assert(Thread.isMainThread)
|
assert(Thread.isMainThread)
|
||||||
|
assert(!isFinished, "Finished operation is attempting to finish again.")
|
||||||
self.isExecutingOperation = false
|
self.isExecutingOperation = false
|
||||||
self.isFinishedOperation = true
|
self.isFinishedOperation = true
|
||||||
}
|
}
|
||||||
|
|
||||||
func didFinish(_ error: Error) {
|
func didFinish(_ error: Error) {
|
||||||
assert(Thread.isMainThread)
|
assert(Thread.isMainThread)
|
||||||
|
assert(!isFinished, "Finished operation is attempting to finish again.")
|
||||||
delegate?.feedlyOperation(self, didFailWith: error)
|
delegate?.feedlyOperation(self, didFailWith: error)
|
||||||
didFinish()
|
didFinish()
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,9 +24,8 @@ final class FeedlySendArticleStatusesOperation: FeedlyOperation {
|
||||||
}
|
}
|
||||||
|
|
||||||
override func main() {
|
override func main() {
|
||||||
defer { didFinish() }
|
|
||||||
|
|
||||||
guard !isCancelled else {
|
guard !isCancelled else {
|
||||||
|
didFinish()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,9 +27,8 @@ final class FeedlySetStarredArticlesOperation: FeedlyOperation {
|
||||||
}
|
}
|
||||||
|
|
||||||
override func main() {
|
override func main() {
|
||||||
defer { didFinish() }
|
|
||||||
|
|
||||||
guard !isCancelled else {
|
guard !isCancelled else {
|
||||||
|
didFinish()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -102,6 +102,7 @@ final class FeedlySyncAllOperation: FeedlyOperation {
|
||||||
|
|
||||||
override func main() {
|
override func main() {
|
||||||
guard !isCancelled else {
|
guard !isCancelled else {
|
||||||
|
// override of cancel calls didFinish().
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue