Code:
private var _nwPathStatusSubject: CurrentValueSubject<NWPath.Status, Never> = .init(.satisfied)
private var networkPathStatusPublisher: AnyPublisher<NWPath.Status, Never> {
_nwPathStatusSubject
.removeDuplicates()
.eraseToAnyPublisher()
}
networkStatusCancellable = networkPathStatusPublisher
.sink {[weak self] newStatus in
print(newStatus)
}
The moment I subscribe to the networkPathStatusPublisher
I get notified in the .sink {[weak self] newStatus in
I'd like to ignore the current/first value on subscription and only make the further event to trigger the execution of the sink
.