mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-22 07:13:58 +01:00
28 lines
716 B
Swift
28 lines
716 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 run() {
|
|
super.run()
|
|
defer {
|
|
didFinish()
|
|
}
|
|
checkpointDelegate?.feedlyCheckpointOperationDidReachCheckpoint(self)
|
|
}
|
|
}
|