shift call to avoid duplication

This commit is contained in:
Scott Pfeil 2024-01-31 09:29:07 -05:00
parent 98f55d4bc5
commit c89efeb3e7

View File

@ -758,6 +758,9 @@
// Allows the view controller to handle specific errors (such as ensure it has all the required data). // Allows the view controller to handle specific errors (such as ensure it has all the required data).
shouldContinue = [viewController shouldFinishProcessingLoad:loadObject error:&error]; shouldContinue = [viewController shouldFinishProcessingLoad:loadObject error:&error];
if (error) {
error = [[MVMCoreLoadHandler sharedGlobal] attachLoadInformation:loadObject toError:error];
}
if (!shouldContinue) { if (!shouldContinue) {
viewController = nil; viewController = nil;
} }
@ -766,9 +769,6 @@
error = [[MVMCoreLoadHandler sharedGlobal] errorForLoadObject:loadObject withTitle:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorTitle] message:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorCritical] code:ErrorCodeInitViewController domain:ErrorDomainNative]; error = [[MVMCoreLoadHandler sharedGlobal] errorForLoadObject:loadObject withTitle:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorTitle] message:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorCritical] code:ErrorCodeInitViewController domain:ErrorDomainNative];
} }
if (error) {
error = [[MVMCoreLoadHandler sharedGlobal] attachLoadInformation:loadObject toError:error];
}
[MVMCoreLoadRequestOperation handleShouldContinue:shouldContinue error:error loadObject:loadObject errorBlock:NULL continueBlock:^{ [MVMCoreLoadRequestOperation handleShouldContinue:shouldContinue error:error loadObject:loadObject errorBlock:NULL continueBlock:^{
completionHandler(viewController,loadObject); completionHandler(viewController,loadObject);
}]; }];