-
Notifications
You must be signed in to change notification settings - Fork 966
Set fixed 10 min interval to update news items #26336
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
A Storybook has been deployed to preview UI for the latest push |
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.
Approving so we can land asap
@@ -31,7 +31,7 @@ export const getRelativeTime = (time: Date | number) => { | |||
const amount = Math.floor(diff / duration) | |||
return { | |||
formatted: rtf.format(amount, unit ), | |||
updatesIn: duration - (Math.abs(diff - amount)), | |||
updatesIn: 10 * minute, |
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.
Maybe do a Math.max
instead?
updatesIn: 10 * minute, | |
updatesIn: Math.max(10 * minute, duration - (Math.abs(diff - amount))), |
Released in v1.73.69 |
Verification PASSED on
Using the STR/Cases outlined via brave/brave-browser#42021 (comment), ensured that the
The above was also verified on |
Resolves brave/brave-browser#42021
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: