Merge branch 'feature/background_request' into 'develop'

Alerts template

See merge request BPHV_MIPS/mvm_core!93
This commit is contained in:
Suresh, Kamlesh Jain 2020-07-15 18:57:31 -04:00
commit 1cbf5e8908
3 changed files with 11 additions and 3 deletions

View File

@ -398,9 +398,13 @@
#pragma mark - Loading Functions
- (MVMCoreLoadRequestOperation *)loadRequest:(nonnull MVMCoreRequestParameters *)requestParameters dataForPage:(nullable NSDictionary *)dataForPage delegateObject:(nullable DelegateObject *)delegateObject {
MVMCoreLoadRequestOperation *loadOperation = [[MVMCoreLoadRequestOperation alloc] initWithRequestParameters:requestParameters dataForPage:dataForPage delegateObject:delegateObject backgroundLoad:NO];
[self.blockingLoadQueue addOperation:loadOperation];
return loadOperation;
if (requestParameters.backgroundRequest) {
return [self loadBackgroundRequest:requestParameters dataForPage:dataForPage delegateObject:delegateObject];
} else {
MVMCoreLoadRequestOperation *loadOperation = [[MVMCoreLoadRequestOperation alloc] initWithRequestParameters:requestParameters dataForPage:dataForPage delegateObject:delegateObject backgroundLoad:NO];
[self.blockingLoadQueue addOperation:loadOperation];
return loadOperation;
}
}
- (MVMCoreLoadRequestOperation *)loadBackgroundRequest:(nonnull MVMCoreRequestParameters *)requestParameters dataForPage:(nullable NSDictionary *)dataForPage delegateObject:(nullable DelegateObject *)delegateObject {

View File

@ -93,6 +93,9 @@ typedef NS_ENUM(NSInteger, MFLoadStyle) {
// A list of page types that this operation should NOT be loaded in parallel with.
@property (nullable, strong, nonatomic) NSArray<NSString *> * successivePageTypes;
/// A flag for if it should be a background request or not.
@property (assign, nonatomic) BOOL backgroundRequest;
// Creates an object with the given page type and extra parameters. Adds the extra parameters to the standard request parameters. Will add any modules needed by the page type by default.
- (nullable instancetype)initWithPageType:(nonnull NSString *)pageType extraParameters:(nullable NSDictionary *)extraParameters;

View File

@ -134,6 +134,7 @@
copyObject.openSupportPanel = self.openSupportPanel;
copyObject.imageData = self.imageData;
copyObject.customTimeoutTime = self.customTimeoutTime;
copyObject.backgroundRequest = self.backgroundRequest;
return copyObject;
}