From 5466c75c5cd794d7a9f56447eda69823c3fbc875 Mon Sep 17 00:00:00 2001 From: Nishanth T Date: Mon, 2 Nov 2020 12:04:53 +0530 Subject: [PATCH] Update MVMCoreLoadRequestOperation.m added function to display alert from "Action" object in response level --- .../LoadHandling/MVMCoreLoadRequestOperation.m | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m index 7bce64d..2bf4fde 100644 --- a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m +++ b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m @@ -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) {