diff --git a/MVMCore/MVMCore/ActionHandling/ActionDelegateProtocol.swift b/MVMCore/MVMCore/ActionHandling/ActionDelegateProtocol.swift index 6788d08..c927e9a 100644 --- a/MVMCore/MVMCore/ActionHandling/ActionDelegateProtocol.swift +++ b/MVMCore/MVMCore/ActionHandling/ActionDelegateProtocol.swift @@ -19,3 +19,9 @@ public extension ActionDelegateProtocol { try await MVMCoreActionHandler.shared()?.handleAction(with: model, additionalData: additionalData, delegateObject: delegateObject) } } + +public extension MVMCoreActionDelegateProtocol { + func action(with model: ActionModelProtocol, additionalData: [AnyHashable : Any]?, delegateObject: DelegateObject?) async throws { + try await (self as? ActionDelegateProtocol)?.performAction(with: model, additionalData: additionalData, delegateObject: delegateObject) + } +} diff --git a/MVMCore/MVMCore/Singletons/MVMCoreObject.m b/MVMCore/MVMCore/Singletons/MVMCoreObject.m index 2bbeb06..21eb44e 100644 --- a/MVMCore/MVMCore/Singletons/MVMCoreObject.m +++ b/MVMCore/MVMCore/Singletons/MVMCoreObject.m @@ -25,9 +25,7 @@ self.session = [[MVMCoreSessionObject alloc] init]; self.cache = [[MVMCoreCache alloc] init]; self.viewControllerMapping = [[MVMCoreViewControllerMappingObject alloc] init]; - [MVMCoreDispatchUtility performSyncBlockOnMainThread:^{ - self.sessionHandler = [[MVMCoreSessionTimeHandler alloc] init]; - }]; + self.sessionHandler = [[MVMCoreSessionTimeHandler alloc] init]; self.actionHandler = [[MVMCoreActionHandler alloc] init]; self.loggingDelegate = [[MVMCoreLoggingHandler alloc] init]; self.loadHandler = [[MVMCoreLoadHandler alloc] init];