Closed Bug 1445769 Opened 3 years ago Closed 3 years ago
Top Sites runs `refresh` at startup even when disabled
52 bytes, text/x-github-pull-request
|Details | Review|
STR: 1. Disable Top Sites via the newtab gear UI * This sets the pref "browser.newtabpage.activity-stream.showTopSites" to false 2. TopSitesFeed.jsm#refresh is still called for at least the `INIT` action, leading to screenshot collection that will go unused
Looks like the issue here is that we have 2 different prefs for controlling Topsites * browser.newtabpage.activity-stream.feeds.topsites decides if the feed gets initialized * browser.newtabpage.activity-stream.showTopSites decides if the section is visible And you would need to set both to false. This issue should probably focus on consolidating the pref into one. Sounds like a dependency for bug 1445158.
Do you know if there are any blockers preventing us from switching away from `showTopSites` and only use `feeds.topsites`?
I can't really think of anything, but there might have been a reason we used a different pref – perhaps check the git history just in case?
A related question is if there's anything that depends on TopSitesFeed running? E.g., TOP_SITES_UPDATED would no longer be dispatched and related TopSites.initialized would always be false? Or any actions that depend on the feed running? TOP_SITES_PIN / PREVIEW stuff are handled there but probably don't need to do anything if we aren't showing top sites… ?
Commit pushed to master at https://github.com/mozilla/activity-stream https://github.com/mozilla/activity-stream/commit/bbd820cb2d33efe7ae53ec6c7a0848a3b1a2ee83 Fix Bug 1445769 - Top Sites runs `refresh` at startup even when disabled
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Component: Activity Streams: Newtab → New Tab Page
You need to log in before you can comment on or make changes to this bug.