Skip to content

Commit

Permalink
♻️ Clean up debugger publisher interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaatttt committed Oct 18, 2023
1 parent 1250cf4 commit 35d03f2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Sources/AppcuesKit/Presentation/Debugger/APIVerifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ internal class APIVerifier {
static let title = "Connected to Appcues"
let networking: Networking

let subject = PassthroughSubject<StatusItem, Never>()
private let subject = PassthroughSubject<StatusItem, Never>()
var publisher: AnyPublisher<StatusItem, Never> { subject.eraseToAnyPublisher() }

init(networking: Networking) {
self.networking = networking
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ internal class DeepLinkVerifier {

var urlTypes: [[String: Any]]? { Bundle.main.object(forInfoDictionaryKey: "CFBundleURLTypes") as? [[String: Any]] }

let subject = PassthroughSubject<StatusItem, Never>()
private let subject = PassthroughSubject<StatusItem, Never>()
var publisher: AnyPublisher<StatusItem, Never> { subject.eraseToAnyPublisher() }

init(applicationID: String) {
self.applicationID = applicationID
Expand Down
4 changes: 2 additions & 2 deletions Sources/AppcuesKit/Presentation/Debugger/Panel/DebugUI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ internal enum DebugUI {
}
.foregroundColor(.secondary)
}
.onReceive(apiVerifier.subject) {
.onReceive(apiVerifier.publisher) {
statusItem = $0
}
}
Expand All @@ -134,7 +134,7 @@ internal enum DebugUI {
}
.foregroundColor(.secondary)
}
.onReceive(deepLinkVerifier.subject) {
.onReceive(deepLinkVerifier.publisher) {
statusItem = $0
}
}
Expand Down

0 comments on commit 35d03f2

Please sign in to comment.