Skip to content
This repository has been archived by the owner on Aug 13, 2021. It is now read-only.

Interactions appear to be misbehaving when multiple subscriptions are made #103

Open
jverkoey opened this issue Apr 14, 2017 · 0 comments
Open
Labels

Comments

@jverkoey
Copy link
Contributor

jverkoey commented Apr 14, 2017

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.

@jverkoey jverkoey added the Bug label Apr 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant