diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2023-04-26 18:07:58 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2023-05-03 16:41:55 +0200 |
| commit | f3760caf18da794e3aaa95a2f40a492d04a3f5f8 (patch) | |
| tree | 5db7476a37518bd1bfc99208098d4fbd3409980d /ios/Operations | |
| parent | 3d4e85a949c2d92a9484e354072df221c477bd63 (diff) | |
| download | mullvadvpn-f3760caf18da794e3aaa95a2f40a492d04a3f5f8.tar.xz mullvadvpn-f3760caf18da794e3aaa95a2f40a492d04a3f5f8.zip | |
Operations: add new tests
Diffstat (limited to 'ios/Operations')
| -rw-r--r-- | ios/Operations/AsyncOperation.swift | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ios/Operations/AsyncOperation.swift b/ios/Operations/AsyncOperation.swift index 2ca049030c..ca11e86d7e 100644 --- a/ios/Operations/AsyncOperation.swift +++ b/ios/Operations/AsyncOperation.swift @@ -436,6 +436,11 @@ extension OperationBlockObserverSupport where Self: AsyncOperation { addBlockObserver(OperationBlockObserver(didFinish: fn)) } + /// Add observer responding to start event. + public func onStart(_ fn: @escaping (Self) -> Void) { + addBlockObserver(OperationBlockObserver(didStart: fn)) + } + /// Add block-based observer. public func addBlockObserver(_ observer: OperationBlockObserver<Self>) { addObserver(observer) |
