improvement to hardcoded debugging functions

This commit is contained in:
Scott Pfeil 2023-09-28 09:26:17 -04:00
parent 20d6149918
commit c93fe59b5c
2 changed files with 7 additions and 5 deletions

View File

@ -297,10 +297,12 @@
} }
#if ENABLE_HARD_CODED_RESPONSE #if ENABLE_HARD_CODED_RESPONSE
if ([[MVMCoreObject sharedInstance].globalLoadDelegate respondsToSelector:@selector(getJSONForPageType:)]) { if ([[MVMCoreObject sharedInstance].globalLoadDelegate respondsToSelector:@selector(getJSONForRequestParameters:)]) {
NSDictionary *json = [[MVMCoreObject sharedInstance].globalLoadDelegate getJSONForPageType:requestParameters.pageType]; NSDictionary *json = [[MVMCoreObject sharedInstance].globalLoadDelegate getJSONForRequestParameters:requestParameters];
completionHandler(json); if (json) {
return; completionHandler(json);
return;
}
} }
#endif #endif

View File

@ -42,7 +42,7 @@
- (BOOL)hasContentToShow:(nonnull MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)error; - (BOOL)hasContentToShow:(nonnull MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)error;
#if ENABLE_HARD_CODED_RESPONSE #if ENABLE_HARD_CODED_RESPONSE
- (nonnull NSDictionary *)getJSONForPageType:(nonnull NSString *)pageType; - (nullable NSDictionary *)getJSONForRequestParameters:(nonnull MVMCoreRequestParameters *)requestParameters;
- (nonnull NSDictionary *)modifyJSON:(nonnull NSDictionary *)json; - (nonnull NSDictionary *)modifyJSON:(nonnull NSDictionary *)json;
#endif #endif