-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnippet15.txt
24 lines (18 loc) · 977 Bytes
/
snippet15.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
- (GO*) getAllMediaContent:(ProgressCancellation)progressCancellation
{
__block GroupOperation* group = [GroupOperation groupProgressDescription:nil
progressCount:nil
progressCancellation:nil
executableBlock:^(GO * _Nonnull mainGroupOp){
void (^universalProgressCancellation)(GO*) = ^(GO* groupOperation){
//⚠️ Keeps track of the "upper" operation, if it was canceled, then cancels itself
if (mainGroupOp.state == RXNO_Cancelled){ [groupOperation cancel]; }
};
GO* musicOperation = [weak getAllMusicProgressCancellation:universalProgressCancellation];
...
GO* videoOperation = [weak getAllVideoProgressCancellation:universalProgressCancellation];
....
}];
...
return go;
}