This repository was archived by the owner on Aug 13, 2021. It is now read-only.

Description
While implementing the visualize operator I encountered problems with some interactions behaving incorrectly when multiple subscriptions were made to the upstream.
The original implementation looked like so:
let visualizationSubscription = self.asStream().toString().dedupe().subscribeToValue { value in
label.text = (prefix ?? "") + stringValue
highlight.alpha = 1
UIView.animate(withDuration: 0.3) {
highlight.alpha = 0
}
}
let subscription = self.asStream().subscribeAndForward(to: observer)
return {
visualizationSubscription.unsubscribe()
subscription.unsubscribe()
}
But this caused the contextual transition demo to behave incorrectly.