-
Notifications
You must be signed in to change notification settings - Fork 944
Index-Free: Persist the lastLimboFreeSnapshot version #2152
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
Index-Free: Persist the lastLimboFreeSnapshot version #2152
Conversation
100d85a
to
6abfa65
Compare
6abfa65
to
2db5d33
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with 1 nit, 1 typo.
true, | ||
false | ||
/* syncStateChanged= */ true, | ||
/* excludesMetadataChanges= */ false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⭐️
@@ -658,6 +658,8 @@ export class LocalStore { | |||
return PersistencePromise.forEach( | |||
viewChanges, | |||
(viewChange: LocalViewChanges) => { | |||
const targetId = viewChange.targetId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: You could use this instead of viewChange.targetId in the next 2 statements as well...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -666,6 +668,21 @@ export class LocalStore { | |||
viewChange.removedKeys, | |||
viewChange.targetId | |||
); | |||
|
|||
if (viewChange.fromCache) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be !viewChange.fromCache
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Tests for this are coming soon :)
This PR ports the end state of
firebase/firebase-android-sdk#771
firebase/firebase-android-sdk#767
firebase/firebase-android-sdk#699
firebase/firebase-android-sdk#616
Since there is a bunch of back and forth in these PRs, I based it on a combined diff: https://gist.github.com/schmidt-sebastian/d6c28b541d48442f19e50f9c78d78d6e