Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jiabingeng committed Nov 19, 2020
1 parent 9ce3872 commit dc32c13
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions AEPCore/Sources/core/MobileCore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ public final class MobileCore: NSObject {

/// Registers an `EventListener` which will be invoked whenever a event with matched type and source is dispatched
/// - Parameters:
/// - type: An `String` indicates the event type the current listener is listening for
/// - source: An `String` indicates the event source the current listener is listening for
/// - listener: An `EventResponseListener` which will be invoked whenever the `EventHub` receives a event with matched typd and source
/// - type: An `String` indicating the event type the current listener is listening for
/// - source: An `String` indicating the event source the current listener is listening for
/// - listener: An `EventResponseListener` which will be invoked whenever the `EventHub` receives a event with matched type and source
@objc(registerEventListenerWithType:source:listener:)
public static func registerEventListener(type: String, source: String, listener: @escaping EventListener) {
EventHub.shared.registerEventListener(type: type, source: source, listener: listener)
Expand Down
8 changes: 4 additions & 4 deletions AEPCore/Sources/eventhub/EventHub.swift
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ final class EventHub {

/// Registers an `EventListener` which will be invoked whenever a event with matched type and source is dispatched
/// - Parameters:
/// - type: An `String` indicates the event type the current listener is listening for
/// - source: An `String` indicates the event source the current listener is listening for
/// - listener: An `EventResponseListener` which will be invoked whenever the `EventHub` receives a event with matched typd and source
/// - type: An `String` indicating the event type the current listener is listening for
/// - source: An `String` indicating the event source the current listener is listening for
/// - listener: An `EventResponseListener` which will be invoked whenever the `EventHub` receives a event with matched type and source
func registerEventListener(type: String, source: String, listener: @escaping EventListener) {
eventHubQueue.async {
// use the event hub placeholder extension to hold all the listeners register from the public API
// use the event hub placeholder extension to hold all the listeners registered from the public API
guard let eventHubExtension = self.registeredExtensions.first(where: { $1.sharedStateName == EventHubConstants.NAME })?.value else {
Log.warning(label: self.LOG_TAG, "Error registering event listener")
return
Expand Down

0 comments on commit dc32c13

Please sign in to comment.