From 3b0feceb186cdc037c0a6cc2b0402698944b2d7e Mon Sep 17 00:00:00 2001 From: Terry Mancey Date: Sat, 7 Dec 2019 16:51:05 +0000 Subject: [PATCH] Fixes `Brave Ads has arrived!` notification in BAT icon is shown after browser restart on clean installs --- components/brave_ads/browser/ads_service_impl.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/brave_ads/browser/ads_service_impl.cc b/components/brave_ads/browser/ads_service_impl.cc index f2e0329a3aa4..d565997f8cf9 100644 --- a/components/brave_ads/browser/ads_service_impl.cc +++ b/components/brave_ads/browser/ads_service_impl.cc @@ -1807,7 +1807,13 @@ void AdsServiceImpl::OnPrefsChanged( if (pref == prefs::kEnabled || pref == brave_rewards::prefs::kBraveRewardsEnabled) { if (IsEnabled()) { - RemoveOnboarding(); +#if !defined(OS_ANDROID) + if (first_run::IsChromeFirstRun()) { + SetBooleanPref(prefs::kShouldShowOnboarding, false); + } else { + RemoveOnboarding(); + } +#endif MaybeStart(false); } else {