-
Notifications
You must be signed in to change notification settings - Fork 948
Don't look up TargetId in notifyLocalViewChanges #1065
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
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 nits.
return PersistencePromise.waitFor(promises); | ||
}); | ||
notifyLocalViewChanges(viewChanges: LocalViewChanges[]): void { | ||
for (const view of viewChanges) { |
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.
Since you've rewritten most of this loop, maybe go ahead and rename 'view' to 'viewChange' for sanity?
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
@@ -26,11 +27,15 @@ import { documentKeySet, DocumentKeySet } from '../model/collections'; | |||
export class LocalViewChanges { | |||
constructor( | |||
readonly query: Query, |
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 query is unused now. Remove it?
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.
Yup, done.
This PR removes a QueryData read from
notifyLocalViewChanges
. This read happened for every target update and was merely used to look up the target ID.