Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Address feedback in PR #8894 #8951

Merged
merged 1 commit into from
May 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/browser/reducers/sitesReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

const appConstants = require('../../../js/constants/appConstants')
const filtering = require('../../filtering')
const siteCache = require('../../../js/state/siteCache')
const siteCache = require('../../common/state/siteCache')
const siteTags = require('../../../js/constants/siteTags')
const siteUtil = require('../../../js/state/siteUtil')
const syncActions = require('../../../js/actions/syncActions')
Expand Down
4 changes: 2 additions & 2 deletions js/state/siteCache.js → app/common/state/siteCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

'use strict'
const Immutable = require('immutable')
const siteUtil = require('./siteUtil')
const UrlUtil = require('../lib/urlutil')
const siteUtil = require('../../../js/state/siteUtil')
const UrlUtil = require('../../../js/lib/urlutil')

const createLocationSiteKeysCache = (state) => {
state = state.set('locationSiteKeysCache', new Immutable.Map())
Expand Down
1 change: 0 additions & 1 deletion js/about/newtab.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ class NewTabPage extends React.Component {
}).size > 0
}
isBookmarked (siteProps) {
// XXX: Fixme, not passing state in!
Copy link
Member

Choose a reason for hiding this comment

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

Did you check if this gets called frequently?

Copy link
Contributor Author

@ayumi ayumi May 19, 2017

Choose a reason for hiding this comment

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

I did check. It gets called once per newtab tab square, but it runs in <= 1ms.

return siteUtil.isSiteBookmarked(this.topSites, siteProps)
}
get gridLayout () {
Expand Down
2 changes: 1 addition & 1 deletion js/state/siteUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'use strict'
const Immutable = require('immutable')
const normalizeUrl = require('normalize-url')
const siteCache = require('./siteCache')
const siteCache = require('../../app/common/state/siteCache')
const siteTags = require('../constants/siteTags')
const settings = require('../constants/settings')
const getSetting = require('../settings').getSetting
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
/* global describe, it */

const siteTags = require('../../../js/constants/siteTags')
const siteCache = require('../../../js/state/siteCache')
const siteUtil = require('../../../js/state/siteUtil')
const siteTags = require('../../../../../js/constants/siteTags')
const siteCache = require('../../../../../app/common/state/siteCache')
const siteUtil = require('../../../../../js/state/siteUtil')
const assert = require('assert')
const Immutable = require('immutable')
// const mockery = require('mockery')
// const settings = require('../../../js/constants/settings')

describe('siteCache', function () {
const testUrl1 = 'https://brave.com/'
Expand Down