Skip to content

Commit

Permalink
Fixes Already sustaining ad notification interaction is shown for c…
Browse files Browse the repository at this point in the history
…onversion of the second ad within the same creative set
  • Loading branch information
tmancey committed Mar 13, 2020
1 parent 2b289b8 commit 80be10c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions vendor/bat-native-ads/src/bat/ads/internal/ads_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1780,10 +1780,13 @@ void AdsImpl::StartSustainingAdNotificationInteraction(
}

void AdsImpl::SustainAdNotificationInteractionIfNeeded() {
last_sustained_ad_notification_url_ = "";

if (!IsStillViewingAdNotification()) {
BLOG(INFO) << "Failed to sustain ad notification interaction, domain for "
"the focused tab does not match the last shown ad notification for "
<< last_shown_ad_notification_.target_url;

return;
}

Expand All @@ -1801,6 +1804,8 @@ void AdsImpl::StopSustainingAdNotificationInteraction() {

ads_client_->KillTimer(sustained_ad_notification_interaction_timer_id_);
sustained_ad_notification_interaction_timer_id_ = 0;

last_sustained_ad_notification_url_ = "";
}

bool AdsImpl::IsSustainingAdNotificationInteraction() const {
Expand Down

0 comments on commit 80be10c

Please sign in to comment.