2019-10-18 23:21:02 +02:00
|
|
|
//
|
|
|
|
// FeedlyCheckpointOperation.swift
|
|
|
|
// Account
|
|
|
|
//
|
|
|
|
// Created by Kiel Gillard on 18/10/19.
|
|
|
|
// Copyright © 2019 Ranchero Software, LLC. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
|
|
|
protocol FeedlyCheckpointOperationDelegate: class {
|
|
|
|
func feedlyCheckpointOperationDidReachCheckpoint(_ operation: FeedlyCheckpointOperation)
|
|
|
|
}
|
|
|
|
|
2020-01-19 23:19:06 +01:00
|
|
|
/// Let the delegate know an instance is executing. The semantics are up to the delegate.
|
2019-10-18 23:21:02 +02:00
|
|
|
final class FeedlyCheckpointOperation: FeedlyOperation {
|
|
|
|
|
|
|
|
weak var checkpointDelegate: FeedlyCheckpointOperationDelegate?
|
2020-01-19 23:19:06 +01:00
|
|
|
|
2020-01-16 06:30:37 +01:00
|
|
|
override func run() {
|
|
|
|
defer {
|
|
|
|
didFinish()
|
2019-10-18 23:21:02 +02:00
|
|
|
}
|
|
|
|
checkpointDelegate?.feedlyCheckpointOperationDidReachCheckpoint(self)
|
|
|
|
}
|
|
|
|
}
|