Update MVMCoreLoadRequestOperation.m

added function to display alert from "Action" object in response level
This commit is contained in:
Nishanth T 2020-11-02 12:04:53 +05:30
parent 75e33cd05b
commit 5466c75c5c

View File

@ -796,7 +796,7 @@
}
//make post load calls function
[MVMCoreLoadRequestOperation loadPostCallActions:loadObject];
[MVMCoreLoadRequestOperation loadCallActions:loadObject];
[loadObject.operation markAsFinished];
}
@ -819,6 +819,20 @@
}
}
+ (void)loadCallActions:(nonnull MVMCoreLoadObject *)loadObject {
NSDictionary *actionDict = [loadObject.responseJSON dict:@"Action"];
if (actionDict) {
//TODO needs to create operation queue based on concurrent flag
//BOOL isConcurrent = [postCallsDict boolForKey:@"concurrent"];
//Needs further enhancements based on the flags.
BOOL shouldTriggerFromCache = [actionDict boolForKey:@"shouldTriggerFromCache"];
//Check if page is not from cache
if (!loadObject.pageDataFromCache || shouldTriggerFromCache) {
[[MVMCoreActionHandler sharedActionHandler] handleActionWithDictionary:actionDict additionalData:nil delegateObject:nil];
}
}
}
+ (void)removeCaches:(nullable NSDictionary *)cacheDictionary {
if (cacheDictionary) {