Post call actions added
This commit is contained in:
parent
5eb6e0169b
commit
976c3a3e7a
@ -845,9 +845,28 @@
|
||||
} else {
|
||||
[MVMCoreLoggingHandler logWithDelegateLoadFinished:loadObject loadedViewController:loadedViewController error:errorObject];
|
||||
}
|
||||
|
||||
//make post load calls function
|
||||
[MVMCoreLoadRequestOperation loadPostCallActions:loadObject];
|
||||
|
||||
[loadObject.operation markAsFinished];
|
||||
}
|
||||
|
||||
|
||||
+ (void)loadPostCallActions:(nonnull MVMCoreLoadObject *)loadObject {
|
||||
NSDictionary *postCallsDict = [loadObject.pageJSON dictionaryForKey:@"postLoadActions"];
|
||||
if (postCallsDict.count > 0) {
|
||||
NSArray *actionList = [postCallsDict arrayForKey:@"actionList"];
|
||||
BOOL isConcurrent = [postCallsDict boolForKey:@"concurrent"];
|
||||
//Needs further enhancements based on the flags.
|
||||
if (isConcurrent) {
|
||||
[actionList enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
[[MVMCoreActionHandler sharedActionHandler] handleActionWithDictionary:obj additionalData:nil delegateObject:nil];
|
||||
}];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Presentation Delegate
|
||||
|
||||
- (void)navigationController:(UINavigationController *)navigationController willDisplayViewController:(UIViewController *)viewController {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user