File tree 2 files changed +23
-0
lines changed
components/brave_ads/browser
2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -645,6 +645,12 @@ Or change later at <ph name="SETTINGS_EXTENIONS_LINK">$2<ex>brave://settings/ext
645
645
<message name =" IDS_BRAVE_ADS_NOTIFICATION_AD_ACCESSIBLE_NAME" desc =" Text to be spoken when a notification ad is shown" >
646
646
Brave Notification Ad
647
647
</message >
648
+ <message name =" IDS_BRAVE_ADS_NOTIFICATION_EXTERNAL_WALLET_CONNECTED_TITLE" desc =" The notification title to show when an external wallet is connected" >
649
+ 🎉 You're now earning for Brave Ads!
650
+ </message >
651
+ <message name =" IDS_BRAVE_ADS_NOTIFICATION_EXTERNAL_WALLET_CONNECTED_BODY" desc =" The notification body to show when an external wallet is connected" >
652
+ For example, you earn whenever a notification like this appears on your screen. You don't need to click to earn.
653
+ </message >
648
654
649
655
<!-- Brave Search -->
650
656
<message name =" IDS_SETTINGS_WEB_DISCOVERY_LABEL" desc =" Description that shows settings for toggle Web Discovery" >
Original file line number Diff line number Diff line change 60
60
#include " brave/components/brave_rewards/common/pref_names.h"
61
61
#include " brave/components/brave_rewards/common/rewards_flags.h"
62
62
#include " brave/components/l10n/common/locale_util.h"
63
+ #include " brave/components/l10n/common/localization_util.h"
63
64
#include " brave/grit/brave_generated_resources.h"
64
65
#include " build/build_config.h"
65
66
#include " chrome/browser/browser_process.h"
@@ -2101,6 +2102,22 @@ void AdsServiceImpl::OnRewardsWalletUpdated() {
2101
2102
2102
2103
void AdsServiceImpl::OnExternalWalletConnected () {
2103
2104
SetBooleanPref (prefs::kShouldMigrateVerifiedRewardsUser , true );
2105
+
2106
+ #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS)
2107
+ if (!IsEnabled () || !CheckIfCanShowNotificationAds ()) {
2108
+ return ;
2109
+ }
2110
+
2111
+ base::Value::Dict dict;
2112
+ dict.Set (" title" ,
2113
+ brave_l10n::GetLocalizedResourceUTF16String (
2114
+ IDS_BRAVE_ADS_NOTIFICATION_EXTERNAL_WALLET_CONNECTED_TITLE));
2115
+ dict.Set (" body" ,
2116
+ brave_l10n::GetLocalizedResourceUTF16String (
2117
+ IDS_BRAVE_ADS_NOTIFICATION_EXTERNAL_WALLET_CONNECTED_BODY));
2118
+ dict.Set (" uuid" , base::GUID::GenerateRandomV4 ().AsLowercaseString ());
2119
+ ShowNotificationAd (std::move (dict));
2120
+ #endif
2104
2121
}
2105
2122
2106
2123
void AdsServiceImpl::OnCompleteReset (const bool success) {
You can’t perform that action at this time.
0 commit comments