mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-12 09:26:26 +01:00
28 lines
740 B
Swift
28 lines
740 B
Swift
|
//
|
||
|
// 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)
|
||
|
}
|
||
|
|
||
|
/// Single responsibility is to let the delegate know an instance is executing. The semantics are up to the delegate.
|
||
|
final class FeedlyCheckpointOperation: FeedlyOperation {
|
||
|
|
||
|
weak var checkpointDelegate: FeedlyCheckpointOperationDelegate?
|
||
|
|
||
|
override func main() {
|
||
|
defer { didFinish() }
|
||
|
guard !isCancelled else {
|
||
|
return
|
||
|
}
|
||
|
checkpointDelegate?.feedlyCheckpointOperationDidReachCheckpoint(self)
|
||
|
}
|
||
|
}
|