Merge branch 'feature/push_interstitial_change' into 'develop'
Post call actions added See merge request BPHV_MIPS/mvm_core!18
This commit is contained in:
commit
12edb0fb91
@ -845,9 +845,31 @@
|
|||||||
} else {
|
} else {
|
||||||
[MVMCoreLoggingHandler logWithDelegateLoadFinished:loadObject loadedViewController:loadedViewController error:errorObject];
|
[MVMCoreLoggingHandler logWithDelegateLoadFinished:loadObject loadedViewController:loadedViewController error:errorObject];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//make post load calls function
|
||||||
|
[MVMCoreLoadRequestOperation loadPostCallActions:loadObject];
|
||||||
|
|
||||||
[loadObject.operation markAsFinished];
|
[loadObject.operation markAsFinished];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+ (void)loadPostCallActions:(nonnull MVMCoreLoadObject *)loadObject {
|
||||||
|
NSDictionary *postCallsDict = [loadObject.pageJSON dict:@"postLoadActions"];
|
||||||
|
if (postCallsDict) {
|
||||||
|
NSArray *actionList = [postCallsDict array:@"actionList"];
|
||||||
|
//TODO needs to create operation queue based on concurrent flag
|
||||||
|
BOOL isConcurrent = [postCallsDict boolForKey:@"concurrent"];
|
||||||
|
//Needs further enhancements based on the flags.
|
||||||
|
BOOL shouldTriggerFromCache = [postCallsDict boolForKey:@"shouldTriggerFromCache"];
|
||||||
|
//Check if page is not from cache
|
||||||
|
if (!loadObject.pageDataFromCache || shouldTriggerFromCache) {
|
||||||
|
[actionList enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||||
|
[[MVMCoreActionHandler sharedActionHandler] handleActionWithDictionary:obj additionalData:nil delegateObject:nil];
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - Presentation Delegate
|
#pragma mark - Presentation Delegate
|
||||||
|
|
||||||
- (void)navigationController:(UINavigationController *)navigationController willDisplayViewController:(UIViewController *)viewController {
|
- (void)navigationController:(UINavigationController *)navigationController willDisplayViewController:(UIViewController *)viewController {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user