Skip to content

Commit

Permalink
Fixes publisher exclude after restart
Browse files Browse the repository at this point in the history
Resolves brave#12766

Auditors:

Test Plan:
  • Loading branch information
NejcZdovc authored and ryanml committed Feb 27, 2018
1 parent 7fed589 commit 00f5b58
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions app/browser/api/ledger.js
Original file line number Diff line number Diff line change
Expand Up @@ -1190,12 +1190,17 @@ const initSynopsis = (state) => {
}

const publishers = ledgerState.getPublishers(state)

for (let item of publishers) {
const publisherKey = item[0]
excludeP(publisherKey, (unused, exclude) => {
appActions.onPublisherOptionUpdate(publisherKey, 'exclude', exclude)
savePublisherOption(publisherKey, 'exclude', exclude)
})
const publisher = item[1] || Immutable.Map()

if (!publisher.getIn(['options', 'exclude'])) {
excludeP(publisherKey, (unused, exclude) => {
appActions.onPublisherOptionUpdate(publisherKey, 'exclude', exclude)
savePublisherOption(publisherKey, 'exclude', exclude)
})
}
}

state = updatePublisherInfo(state)
Expand Down

0 comments on commit 00f5b58

Please sign in to comment.