Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes Already sustaining ad notification interaction is shown for conversion of the second ad within the same creative set #4906

Merged
merged 1 commit into from
Mar 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: extra line

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