Skip to content

Commit

Permalink
Changes from feat/listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
jguz-pubnub committed Aug 20, 2024
1 parent 7403207 commit 19b7e20
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class SubscribeTransition: TransitionProtocol {
case .subscriptionRestored:
return true
case .unsubscribeAll:
return true
return !(state is Subscribe.UnsubscribedState)
case .disconnect:
return !(
state is Subscribe.HandshakeStoppedState || state is Subscribe.ReceiveStoppedState ||
Expand Down
4 changes: 2 additions & 2 deletions Sources/PubNub/Events/New/EventListenerInterface.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class StatusListener: StatusListenerInterface {
public let queue: DispatchQueue
public var onConnectionStateChange: ((ConnectionStatus) -> Void)?

init(
public init(
uuid: UUID = UUID(),
queue: DispatchQueue = .main,
onConnectionStateChange: @escaping ((ConnectionStatus) -> Void)
Expand Down Expand Up @@ -80,7 +80,7 @@ public class EventListener: EventListenerInterface {
public var onFileEvent: ((PubNubFileChangeEvent) -> Void)?
public var onAppContext: ((PubNubAppContextEvent) -> Void)?

init(
public init(
queue: DispatchQueue = .main,
uuid: UUID = UUID(),
onEvent: ((PubNubEvent) -> Void)? = nil,
Expand Down
2 changes: 1 addition & 1 deletion Sources/PubNub/Subscription/SubscriptionSession.swift
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ extension SubscriptionSession {
return nil
}
}.filter {
!(Set($0.subscriptionTopology[subscription.subscriptionType] ?? []).intersection(namesToFind).isEmpty)
!(Set($0.subscriptionTopology[subscription.subscriptionType] ?? []).isDisjoint(with: namesToFind))
}
}

Expand Down

0 comments on commit 19b7e20

Please sign in to comment.