From 64aba6a1008c2420557b2af5d94cc8e645d569a5 Mon Sep 17 00:00:00 2001 From: Scott Pfeil Date: Wed, 3 Apr 2024 21:49:19 -0400 Subject: [PATCH] Digital PCT265 story MVAPCT-48 - Bug fixes and optimizations --- MVMCore/MVMCore/ActionHandling/ActionOpenPageHandler.swift | 2 +- .../LoadHandling/MVMCoreLoadRequestOperation+Extension.swift | 1 + MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.h | 1 - MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m | 1 + 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/MVMCore/MVMCore/ActionHandling/ActionOpenPageHandler.swift b/MVMCore/MVMCore/ActionHandling/ActionOpenPageHandler.swift index 475b9da..930306a 100644 --- a/MVMCore/MVMCore/ActionHandling/ActionOpenPageHandler.swift +++ b/MVMCore/MVMCore/ActionHandling/ActionOpenPageHandler.swift @@ -83,7 +83,7 @@ open class ActionOpenPageHandler: MVMCoreJSONActionHandlerProtocol { } // Adds any client parameters to the request parameters. if let parametersToFetch = model.clientParameters, - let fetchedParameters = try await ClientParameterHandler().getClientParameters( + let fetchedParameters = await ClientParameterHandler().getClientParameters( with: parametersToFetch, requestParameters: requestParameters.parameters as? [String : Any] ?? [:], actionId: MVMCoreActionHandler.getUUID(additionalData: additionalData) ?? "unknown", diff --git a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation+Extension.swift b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation+Extension.swift index 468bf40..53a0e86 100644 --- a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation+Extension.swift +++ b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation+Extension.swift @@ -69,6 +69,7 @@ public extension MVMCoreLoadRequestOperation { return nil } MVMCoreLoggingHandler.logDebugMessage(withDelegate: "\(type(of: self)): Navigated to controller. pageType:\(pageType) controllerType:\(String(describing: controllerType))") + stopLoadingAnimationIfNeeded() return viewController } diff --git a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.h b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.h index fccbe82..c7d450b 100644 --- a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.h +++ b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.h @@ -19,7 +19,6 @@ @interface MVMCoreLoadRequestOperation : MVMCoreOperation @property (nullable, strong, nonatomic) MVMCoreRequestParameters *requestParameters; -/// For load objects as in input parameter. Does not attach self generated load objects. @property (nullable, strong, nonatomic) MVMCoreLoadObject *loadObject; @property (nullable, strong, nonatomic) NSDictionary *dataForPage; @property (nullable, strong, nonatomic) DelegateObject *delegateObject; diff --git a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m index 78108f9..699df7b 100644 --- a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m +++ b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m @@ -147,6 +147,7 @@ // Create a load object from any data we fetched. MVMCoreLoadObject *loadObject = [self createLoadObjectWithPageFromCache:pageFromCache modulesFromCache:modulesFromCache]; + self.loadObject = loadObject; // Check if we need to go to server for missing data. MVMCoreRequestParameters *requestForMissingData = [MVMCoreLoadRequestOperation createRequestForDataWithLoadObject:loadObject];