-
Notifications
You must be signed in to change notification settings - Fork 944
Remove instanceof IndexedDbRemoteDocumentCache check #2566
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
Conversation
* Returns the set of documents that have been updated since the specified read | ||
* time. | ||
*/ | ||
// PORTING NOTE: This is only used for multi-tab synchronization. |
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.
Drive by comment: don't the comments still apply? (i.e. isn't this still only used for multi-tab?)
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.
The comment is already on the interface declaration.
@var-const Do you have cycles for this today? |
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.
Code changes LGTM.
I'd suggest renaming the PR, though. getLastDocumentChange
isn't just simplified, it's replaced with a different (simpler) function.
* SnapshotVersion.MIN if not available. | ||
*/ | ||
// PORTING NOTE: This is only used for multi-tab synchronization. | ||
getLastReadTime( |
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.
Question: why is this declaration here, whereas previously getLastDocumentChange
wasn't?
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.
It allows me to use this method in Persistence without checking instanceof IndexedDbRemoteDocumentCache
Changed the PR title to "Remove instanceof IndexedDbRemoteDocumentCache check" to be more in line with the intention of the PR. Thanks for the review! |
1 similar comment
Changed the PR title to "Remove instanceof IndexedDbRemoteDocumentCache check" to be more in line with the intention of the PR. Thanks for the review! |
Goal: remove
instanceof IndexedDbRemoteDocumentCache
check in LocalStore to allow me to drop the import.Realized: We don't even use the document result from getLastDocumentChange. So I changed it to only return the read time.