Update MVMCoreLoadRequestOperation.m

indentation and  lifted out delegate obj
This commit is contained in:
Nishanth T 2020-11-03 22:18:08 +05:30
parent ecbb9438bc
commit edfdc8576c

View File

@ -779,12 +779,11 @@
if ([loadObject.operation checkAndHandleForCancellation]) { if ([loadObject.operation checkAndHandleForCancellation]) {
return; return;
} }
DelegateObject *delegateObject = nil;
// Show any alerts that we have been saving.
if (loadObject.operation.alertToShow) {
// If we have an alert to show and a loaded view controller, allow the loaded view controller to be the delegate. // If we have an alert to show and a loaded view controller, allow the loaded view controller to be the delegate.
delegateObject = [loadedViewController respondsToSelector:@selector(delegateObject)] ? [loadedViewController delegateObject] : loadObject.operation.delegateObject; DelegateObject *delegateObject = [loadedViewController respondsToSelector:@selector(delegateObject)] ? [loadedViewController delegateObject] : loadObject.operation.delegateObject;
// Show any alerts that we have been saving.
if (loadObject.operation.alertToShow) {
[MVMCoreLoadRequestOperation createAndShowAlertForLoadObject:loadObject error:loadObject.operation.errorForAlertToShow delegateObject:delegateObject]; [MVMCoreLoadRequestOperation createAndShowAlertForLoadObject:loadObject error:loadObject.operation.errorForAlertToShow delegateObject:delegateObject];
} }