Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(PAGE_VISIBILITY): share replay of page visibility #45

Merged

Conversation

jackfrate
Copy link
Contributor

@jackfrate jackfrate commented May 20, 2022

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows Conventional Commits
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Other... Please describe:

What is the current behavior?

When the PAGE_VISIBILITY stream has more than one subscriber, all subscribers after the first will not get a value until the stream fires again (upon leaving and re-entering the page).

Issue Number: #44

What is the new behavior?

All subscribers of PAGE_VISIBILITY will get the most recent value upon subscription.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

This could also be fixed by removing the share operator from the end of the pipe, but shareReplay stops the side effects from running more than once.

@waterplea waterplea merged commit 09b0956 into taiga-family:master Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants