change successivePageTypes to sequentialPageTypes
This commit is contained in:
parent
d30a027b40
commit
d0deb2559a
@ -72,7 +72,7 @@
|
||||
if (operation.dependenciesAdded) return; // Prevents dependencies from being added twice.
|
||||
operation.dependenciesAdded = YES;
|
||||
NSString *addingPageType = operation.requestParameters.pageType;
|
||||
NSArray<NSString *>* successivePageTypes = operation.requestParameters.successivePageTypes;
|
||||
NSArray<NSString *>* sequentialPageTypes = operation.requestParameters.sequentialPageTypes;
|
||||
// For each registered queue...
|
||||
for (NSOperationQueue *queue in self.registeredLoadQueues) {
|
||||
// Iterate thru each existing operation...
|
||||
@ -82,8 +82,8 @@
|
||||
MVMCoreRequestParameters *existingOpParams = ((MVMCoreLoadRequestOperation *)existingOperation).requestParameters;
|
||||
// If existing operation page type is one of the new operation registered conflicting page types,
|
||||
// or the new operation page type is one of the existing operation's conflicting page types...
|
||||
if ([successivePageTypes containsObject:existingOpParams.pageType] ||
|
||||
[existingOpParams.successivePageTypes containsObject:addingPageType]) {
|
||||
if ([sequentialPageTypes containsObject:existingOpParams.pageType] ||
|
||||
[existingOpParams.sequentialPageTypes containsObject:addingPageType]) {
|
||||
// Add a dependency on the new page type of the existing page type. Note dependencies are only added to new operations, so the method would never push an operation ahead of an exisitng operation, avoiding causing circular dependencies.
|
||||
MVMCoreLog(@"Adding %@ call dependency on %@", existingOpParams.pageType, operation.requestParameters.pageType);
|
||||
[operation addDependency:existingOperation];
|
||||
|
||||
@ -91,7 +91,7 @@ typedef NS_ENUM(NSInteger, MFLoadStyle) {
|
||||
@property (nonatomic) BOOL openSupportPanel;
|
||||
|
||||
// A list of page types that this operation should NOT be loaded in parallel with.
|
||||
@property (nullable, strong, nonatomic) NSArray<NSString *> * successivePageTypes;
|
||||
@property (nullable, strong, nonatomic) NSArray<NSString *> * sequentialPageTypes;
|
||||
|
||||
/// A flag for if it should be a background request or not.
|
||||
@property (assign, nonatomic) BOOL backgroundRequest;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user