-
Notifications
You must be signed in to change notification settings - Fork 878
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removes unnecessary getters for the same publisher
Resolves brave/brave-browser#3525
- Loading branch information
Showing
5 changed files
with
15 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,11 +82,13 @@ export const rewardsPanelReducer = (state: RewardsExtension.State | undefined, a | |
const publishers: Record<string, RewardsExtension.Publisher> = state.publishers | ||
const publisher = publishers[id] | ||
|
||
if ((payload.onlyDiff && publisher && publisher.tabUrl !== tab.url) || !payload.onlyDiff) { | ||
chrome.braveRewards.getPublisherData(tab.windowId, tab.url, tab.favIconUrl || '', payload.publisherBlob || '') | ||
} | ||
|
||
if (!publisher || (publisher && publisher.tabUrl !== tab.url)) { | ||
chrome.braveRewards.getPublisherData( | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
NejcZdovc
Author
Contributor
|
||
tab.windowId, | ||
tab.url, | ||
tab.favIconUrl || '', | ||
payload.publisherBlob || '') | ||
|
||
if (publisher) { | ||
delete publishers[id] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Moving this here prevents media publishers from showing in panel