1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
import Foundation
|
|
14 |
import UIKit
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
public struct InlinePostTask<VC: UIViewController, C>: PostRoutingTask {
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
private let completion: (_: VC, _: C, _: [UIViewController]) -> Void
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
public init(_ completion: @escaping (_: VC, _: C, _: [UIViewController]) -> Void) {
|
15x |
33 |
self.completion = completion
|
15x |
34 |
}
|
15x |
35 |
|
|
36 |
public func perform(on viewController: VC, with context: C, routingStack: [UIViewController]) {
|
19x |
37 |
completion(viewController, context, routingStack)
|
19x |
38 |
}
|
19x |
39 |
|
|
40 |
}
|
|