Repository navigation
Fix Onyx.mergeCollection doesn't update subscribers - #57
Merged
Merged
Conversation
marcaaron
marked this pull request as ready for review
April 1, 2021 16:56
marcaaron
requested review from
a team and
Julesssss
and removed request for
pecanoro
April 1, 2021 16:56
Julesssss
approved these changes
Apr 1, 2021
This was referenced Apr 1, 2021
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
When we implemented the
mergeCollection()feature we only set it up so that it would update subscribers of the collection key and not any individual subscribers. This prevents any components that are subscribing to an individual key from updating whenmergeCollection()is called. So e.g. a component subscribing toreport_would have gotten an update but a component subscribing toreport_123would not.cc @Julesssss
Fixed Issues
Fixes https://github.com/Expensify/Expensify/issues/159086
Tests
Added a unit test to verify this is working and also updates individual subscribers to collection keys when we call
mergeCollection().