Skip to content

Commit

Permalink
Ensure publishers are pushed when opting in
Browse files Browse the repository at this point in the history
  • Loading branch information
fallaciousreasoning committed Jan 24, 2023
1 parent c924d42 commit c109c7c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions components/brave_today/browser/brave_news_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,16 @@ void BraveNewsController::ConditionallyStartOrStopTimer() {
timer_prefetch_.Start(FROM_HERE, base::Minutes(1), this,
&BraveNewsController::Prefetch);
}

GetPublishers(base::BindOnce(
[](BraveNewsController* controller, Publishers publishers) {
auto event = brave_news::mojom::PublishersEvent::New();
event->addedOrUpdated = std::move(publishers);
for (const auto& listener : controller->publishers_listeners_) {
listener->Changed(event->Clone());
}
},
base::Unretained(this)));
} else {
VLOG(1) << "STOPPING TIMERS";
timer_feed_update_.Stop();
Expand Down

0 comments on commit c109c7c

Please sign in to comment.