-
Notifications
You must be signed in to change notification settings - Fork 893
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
Get and update sync code only after sync chain is created #6182
Conversation
954147e
to
631263a
Compare
restart CI for window only |
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.
Just 1 minor issue
@@ -82,11 +78,20 @@ Polymer({ | |||
return displayDate.toDateString() | |||
}, | |||
|
|||
onViewSyncCode_: function() { | |||
getSyncCode_: async function() { |
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.
My preference would be to call this ensureSetSyncCode
or at least not have get
in it, since it's confusing when reading the calls to it as getXYZ
implies returning a value.
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.
fixed
@darkdh was this issue caused because the 'configure' component is not removed and re-attached when finishing setting up the new sync chain and exiting the sync section? |
No, it is actually caused by user navigate to sync page for the first time without any sync chain setup. At that point, it tries to get sync code from pref but it shouldn't |
Otherwise, we end up caching wrong sync code when page is loaded and it will only be updated after a page refresh
631263a
to
4a22990
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.
Works perfectly! 👍 Thanks for adding the comment and fixing the reset sync chain case 😄
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
LGTM Verification passed on
Verified test plan from #6182 (comment). |
Otherwise, we end up caching wrong sync code when page is loaded and it
will only be updated after a page refresh
Resolves brave/brave-browser#10857
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
View Sync Code
after sync creation brave-browser#10857View Sync Code
Reviewer Checklist:
After-merge Checklist:
changes has landed on.