From 5e77e848dde87a3d81bd197d9f194c9f9cbff175 Mon Sep 17 00:00:00 2001 From: Kyle Hickinson Date: Tue, 3 Oct 2023 12:29:50 -0400 Subject: [PATCH] Fix brave/brave-ios#8178: Set the NTP-SI P3A total count correctly (brave/brave-ios#8179) --- .../Browser/New Tab Page/Backgrounds/NewTabPageP3AHelper.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/Brave/Frontend/Browser/New Tab Page/Backgrounds/NewTabPageP3AHelper.swift b/Sources/Brave/Frontend/Browser/New Tab Page/Backgrounds/NewTabPageP3AHelper.swift index a0096d3c62d5..e606d985e95d 100644 --- a/Sources/Brave/Frontend/Browser/New Tab Page/Backgrounds/NewTabPageP3AHelper.swift +++ b/Sources/Brave/Frontend/Browser/New Tab Page/Backgrounds/NewTabPageP3AHelper.swift @@ -143,6 +143,8 @@ final class NewTabPageP3AHelper { let name = DynamicHistogramName(creativeInstanceId: creativeInstanceId, eventType: eventType) countsStorage.eventCounts[creativeInstanceId]?.inflightCounts[eventType] = count UmaHistogramRecordValueToBucket(name.histogramName, buckets: countBuckets, value: count) + } + if !eventCounts.counts.isEmpty { totalActiveCreatives += 1 } }