From 6a57e6b90382c829b17d118a9b32d4c08c20e5de Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Mon, 25 Jan 2021 11:13:15 -0500 Subject: [PATCH] actions mapped --- MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.m | 4 +++- MVMCore/MVMCore/Constants/MVMCoreJSONConstants.h | 1 + MVMCore/MVMCore/Constants/MVMCoreJSONConstants.m | 1 + MVMCore/MVMCore/Models/ModelMapping.swift | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.m b/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.m index 7bb2a11..f4c389d 100644 --- a/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.m +++ b/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.m @@ -84,7 +84,9 @@ NSString * const KeyActionTypeOpen = @"openPage"; } else if ([actionType isEqualToString:KeyActionTypeSettings]) { [self settingsAction:actionInformation additionalData:additionalData delegateObject:delegateObject]; - } else if ([actionType isEqualToString:KeyActionTypeNoop]){ + } else if ([actionType isEqualToString:KeyActionTypeNoop]) { + } else if ([actionType isEqualToString:KeyActionTypeActions]) { + [self actions:actionInformation additionalData:additionalData delegateObject:delegateObject]; } else if (![self handleOtherActions:actionType actionInformation:actionInformation additionalData:additionalData delegateObject:delegateObject]) { // not a known action type. [self unknownAction:actionType actionInformation:actionInformation additionalData:additionalData delegateObject:delegateObject]; diff --git a/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.h b/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.h index 220b180..c2d7f8e 100644 --- a/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.h +++ b/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.h @@ -40,6 +40,7 @@ extern NSString * const KeyActionTypeCancel; extern NSString * const KeyActionTypeRedirect; extern NSString * const KeyActionTypeSettings; extern NSString * const KeyActionTypeNoop; +extern NSString * const KeyActionTypeActions; extern NSString * const KeyActionInformation; extern NSString * const KeyLinkAwayAppURL; extern NSString * const KeyLinkAwayURL; diff --git a/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.m b/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.m index 2127e2e..80317ea 100644 --- a/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.m +++ b/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.m @@ -40,6 +40,7 @@ NSString * const KeyActionTypeCancel = @"cancel"; NSString * const KeyActionTypeRedirect = @"switchApp"; NSString * const KeyActionTypeSettings = @"openSettings"; NSString * const KeyActionTypeNoop = @"noop"; +NSString * const KeyActionTypeActions = @"actions"; NSString * const KeyActionInformation = @"actionInformation"; NSString * const KeyLinkAwayAppURL = @"appURL"; NSString * const KeyLinkAwayURL = @"browserUrl"; diff --git a/MVMCore/MVMCore/Models/ModelMapping.swift b/MVMCore/MVMCore/Models/ModelMapping.swift index 74acf80..6c3df04 100644 --- a/MVMCore/MVMCore/Models/ModelMapping.swift +++ b/MVMCore/MVMCore/Models/ModelMapping.swift @@ -21,5 +21,6 @@ import Foundation try? ModelRegistry.register(ActionCancelModel.self) try? ModelRegistry.register(ActionSettingModel.self) try? ModelRegistry.register(ActionNoopModel.self) + try? ModelRegistry.register(ActionActionsModel.self) } }