Skip to content

Commit

Permalink
do not show default chrome store url on NTP for any locale
Browse files Browse the repository at this point in the history
fix brave/brave-browser#5376

previous fix referenced the URL locale allowing the tile to still
show for locales other than en-US.
  • Loading branch information
cezaraugusto committed Aug 26, 2019
1 parent 2574cc5 commit 49941e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/brave_new_tab_ui/api/topSites/grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ import { debounce } from '../../../common/debounce'
export const getGridSites = (state: NewTab.State, checkBookmarkInfo?: boolean) => {
const sizeToCount = { large: 18, medium: 12, small: 6 }
const count = sizeToCount[state.gridLayoutSize || 'small']
const defaultChromeUrl = 'https://chrome.google.com/webstore?hl=en'
const defaultChromeWebStoreUrl = 'https://chrome.google.com/webstore'

// Start with top sites with filtered out ignored sites and pinned sites
let gridSites = state.topSites.slice()
.filter((site) =>
!state.ignoredTopSites.find((ignoredSite) => ignoredSite.url === site.url) &&
!state.pinnedTopSites.find((pinnedSite) => pinnedSite.url === site.url) &&
site.url !== defaultChromeUrl
// see https://github.com/brave/brave-browser/issues/5376
!site.url.startsWith(defaultChromeWebStoreUrl)
)

// Then add in pinned sites at the specified index, these need to be added in the same
Expand Down

0 comments on commit 49941e2

Please sign in to comment.