From 052165420de8c8613c41e3ad04c5c1187f730978 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 3 Mar 2022 16:14:06 -0600 Subject: [PATCH] refactored to use new ModelHandler Signed-off-by: Matt Bruce --- MVMCore/MVMCore/ActionHandling/ActionOpenUrlHandler.swift | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/MVMCore/MVMCore/ActionHandling/ActionOpenUrlHandler.swift b/MVMCore/MVMCore/ActionHandling/ActionOpenUrlHandler.swift index 991ed89..83228dc 100644 --- a/MVMCore/MVMCore/ActionHandling/ActionOpenUrlHandler.swift +++ b/MVMCore/MVMCore/ActionHandling/ActionOpenUrlHandler.swift @@ -8,11 +8,9 @@ import Foundation -open class ActionOpenUrlHandler: MVMCoreActionHandlerProtocol { - required public init() {} +open class ActionOpenUrlHandler: ModelHandler { - open func handleAction(_ model: ActionModelProtocol, additionalData: [AnyHashable : Any]?, delegateObject: DelegateObject?) { - guard let model = model as? ActionOpenUrlModel else { return } + public override func perform() { MVMCoreDispatchUtility.performBlock(onMainThread: { [self] in // Try loading the app url first, otherwise fall back to browser url. guard let appURL = model.appURL else {