Skip to content

Commit 5eeef84

Browse files
committed
We need to normalize synopsis after settings change
Resolves brave/brave-browser#3015
1 parent 8b91da9 commit 5eeef84

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

browser/ui/webui/brave_rewards_ui.cc

-4
Original file line numberDiff line numberDiff line change
@@ -621,22 +621,18 @@ void RewardsDOMHandler::SaveSetting(const base::ListValue* args) {
621621

622622
if (key == "contributionMinTime") {
623623
rewards_service_->SetPublisherMinVisitTime(std::stoull(value));
624-
OnContentSiteUpdated(rewards_service_);
625624
}
626625

627626
if (key == "contributionMinVisits") {
628627
rewards_service_->SetPublisherMinVisits(std::stoul(value));
629-
OnContentSiteUpdated(rewards_service_);
630628
}
631629

632630
if (key == "contributionNonVerified") {
633631
rewards_service_->SetPublisherAllowNonVerified(value == "true");
634-
OnContentSiteUpdated(rewards_service_);
635632
}
636633

637634
if (key == "contributionVideos") {
638635
rewards_service_->SetPublisherAllowVideos(value == "true");
639-
OnContentSiteUpdated(rewards_service_);
640636
}
641637

642638
if (key == "enabledContribute") {

vendor/bat-native-ledger/src/bat_publishers.cc

+4-1
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,13 @@ void BatPublishers::OnRestorePublishersInternal(bool success) {
428428
void BatPublishers::setPublisherMinVisitTime(const uint64_t& duration) { // In seconds
429429
state_->min_publisher_duration_ = duration;
430430
saveState();
431+
synopsisNormalizer();
431432
}
432433

433434
void BatPublishers::setPublisherMinVisits(const unsigned int& visits) {
434435
state_->min_visits_ = visits;
435436
saveState();
437+
synopsisNormalizer();
436438
}
437439

438440
void BatPublishers::setPublishersLastRefreshTimestamp(uint64_t ts) {
@@ -448,11 +450,13 @@ void BatPublishers::setNumExcludedSites(const unsigned int& amount) {
448450
void BatPublishers::setPublisherAllowNonVerified(const bool& allow) {
449451
state_->allow_non_verified_ = allow;
450452
saveState();
453+
synopsisNormalizer();
451454
}
452455

453456
void BatPublishers::setPublisherAllowVideos(const bool& allow) {
454457
state_->allow_videos_ = allow;
455458
saveState();
459+
synopsisNormalizer();
456460
}
457461

458462
uint64_t BatPublishers::getPublisherMinVisitTime() const {
@@ -484,7 +488,6 @@ void BatPublishers::NormalizeContributeWinners(
484488
bool saveData,
485489
const ledger::PublisherInfoList& list,
486490
uint32_t record) {
487-
488491
synopsisNormalizerInternal(newList, saveData, list, record);
489492
}
490493

0 commit comments

Comments
 (0)