Skip to content
This repository has been archived by the owner on Feb 29, 2020. It is now read-only.

feat(topstories): Get new recommendations on locale|options change #3037

Merged
merged 1 commit into from
Jul 31, 2017

Conversation

csadilek
Copy link
Collaborator

Follow up to #3021, fixes #3000, by making sure the feed re-initializes when its options have changed.

This also includes the refactoring to no longer read the locale from within the TopStoriesFeed.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.407% when pulling 3c4a1b3 on csadilek:3000 into f52f501 on mozilla:master.

Copy link
Member

@Mardak Mardak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Sorry for the back and forth on some of these changes. Neat that this works for all options changes instead of just locale.


init() {
try {
this.storiesLastUpdated = 0;
this.topicsLastUpdated = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole try block is a bit odd in that various things that don't need to be inside are. E.g., this assignments really shouldn't be throwing.

Don't need to fix now, but what are we actually expecting to fail? I could see JSON.parse failing.. anything else?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mardak true, nothing else throwing here anymore. so, the scope is too wide. It's really about catching invalid JSON in .options.

@Mardak Mardak merged commit c260e0a into mozilla:master Jul 31, 2017
@Mardak Mardak added the PR / R+ label Jul 31, 2017
@as-pine-proxy
Copy link
Collaborator

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get new recommendations on locale change
4 participants