diff --git a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.h b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.h index 17b6d1e..22b8cb9 100644 --- a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.h +++ b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.h @@ -88,6 +88,9 @@ // Displays the view controller to the screen. + (void)displayViewController:(nonnull UIViewController *)viewController loadObject:(nullable MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)error; +/// Checks to see if the operation has content to show. ++ (BOOL)hasContentToShow:(nonnull MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)error; + // Handles the error based on the error object passed in. May log and/or display the error. + (void)handleError:(nonnull MVMCoreErrorObject *)error loadObject:(nonnull MVMCoreLoadObject *)loadObject showAlertForErrorIfApplicable:(BOOL)showAlertForErrorIfApplicable; diff --git a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m index 3b244a7..e1b4e78 100644 --- a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m +++ b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m @@ -167,7 +167,7 @@ // Can continue loading with the page. [MVMCoreLoadRequestOperation handleLoadObject:loadObject error:error]; - } else if ([MVMCoreLoadRequestOperation hasSomethingToShow:loadObject error:error] || loadObject.operation.backgroundLoad || loadObject.requestParameters.noViewControllerToLoad) { + } else if ([MVMCoreLoadRequestOperation hasContentToShow:loadObject error:error] || loadObject.operation.backgroundLoad || loadObject.requestParameters.noViewControllerToLoad) { // Something to show, or nothing was expected to show, can finish. [MVMCoreLoadRequestOperation loadFinished:loadObject loadedViewController:nil errorObject:error]; @@ -732,7 +732,7 @@ }]; } -+ (BOOL)hasSomethingToShow:(nonnull MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)error { ++ (BOOL)hasContentToShow:(nonnull MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)error { return loadObject.operation.alertToShow || [loadObject.responseJSON objectForKey:@"PostAction"] || [loadObject.responseJSON objectForKey:@"TopNotification"]; }