You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// We are iterating over all subscribers similar to keyChanged(). However, we are looking for subscribers who are subscribing to either a collection key or
418
474
// individual collection key member for the collection that is being updated. It is important to note that the collection parameter cane be a PARTIAL collection
419
475
// and does not represent all of the combined keys and values for a collection key. It is just the "new" data that was merged in via mergeCollection().
// We are iterating over all subscribers to see if they are interested in the key that has just changed. If the subscriber's key is a collection key then we will
594
652
// notify them if the key that changed is a collection member. Or if it is a regular key notify them when there is an exact match. Depending on whether the subscriber
595
653
// was connected via withOnyx we will call setState() directly on the withOnyx instance. If it is a regular connection we will pass the data to the provided callback.
@@ -773,7 +831,7 @@ function addKeyToRecentlyAccessedIfNeeded(mapping) {
773
831
thrownewError(`Cannot subscribe to safe eviction key '${mapping.key}' without providing a canEvict value.`);
774
832
}
775
833
776
-
addLastAccessedKey(mapping.key);
834
+
addLastAccessedKey(getCacheKey(mapping.key));
777
835
}
778
836
}
779
837
@@ -800,6 +858,15 @@ function getCollectionDataAndSendAsObject(matchingKeys, mapping) {
// (eg. if a user switches chats really quickly). In this case, it's much more stable to always look at the changes to prevProp and prevState to derive the key.
129
129
// The second case cannot be used all the time because the onyx data doesn't change the first time that `componentDidUpdate()` runs after loading. In this case,
130
130
// the `mapping.previousKey` must be used for the comparison or else this logic never detects that onyx data could have changed during the loading process.
0 commit comments