From 75eb253b9629ae8ea48cf9f769b0abcdd21debb0 Mon Sep 17 00:00:00 2001 From: LK-Simon Date: Tue, 16 Aug 2022 11:51:37 +0200 Subject: [PATCH] 4.0.2 - Bug Fix Fixed a bug in `EventThread` for method `removeEventCallback` where it was declared with an incorrect parameter type for `forEventType`. --- Sources/EventDrivenSwift/EventThread/EventThread.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/EventDrivenSwift/EventThread/EventThread.swift b/Sources/EventDrivenSwift/EventThread/EventThread.swift index 6046c91..d0ba6dd 100644 --- a/Sources/EventDrivenSwift/EventThread/EventThread.swift +++ b/Sources/EventDrivenSwift/EventThread/EventThread.swift @@ -85,11 +85,11 @@ open class EventThread: EventReceiver, EventThreadable { /** Removes an Event Callback for the given `Eventable` Type - Author: Simon J. Stuart - - Version: 4.0.0 + - Version: 4.0.2 - Parameters: - forEventType: The `Eventable` Type for which to Remove the Callback */ - open func removeEventCallback(forEventType: any Eventable) { + open func removeEventCallback(forEventType: Eventable.Type) { let eventTypeName = String(reflecting: forEventType) _eventCallbacks.withLock { eventCallbacks in @@ -98,7 +98,7 @@ open class EventThread: EventReceiver, EventThreadable { let dispatcher: EventDispatching = eventPool == nil ? EventCentral.shared : eventPool! - dispatcher.removeReceiver(self, forEventType: type(of: forEventType)) + dispatcher.removeReceiver(self, forEventType: forEventType) } /**