Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Fix #8673: Move NTP P3A helper creation outside of NTP #8676

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ public class BrowserViewController: UIViewController {

/// In app purchase obsever for VPN Subscription action
let iapObserver: IAPObserver

private let ntpP3AHelper: NewTabPageP3AHelper

public init(
windowId: UUID,
Expand Down Expand Up @@ -334,6 +336,7 @@ public class BrowserViewController: UIViewController {
}

iapObserver = BraveVPN.iapObserver
ntpP3AHelper = .init(p3aUtils: braveCore.p3aUtils)

super.init(nibName: nil, bundle: nil)
didInit()
Expand Down Expand Up @@ -1419,7 +1422,7 @@ public class BrowserViewController: UIViewController {
feedDataSource: feedDataSource,
rewards: rewards,
privateBrowsingManager: privateBrowsingManager,
p3aUtils: braveCore.p3aUtils
p3aHelper: ntpP3AHelper
)
// Donate NewTabPage Activity For Custom Suggestions
let newTabPageActivity =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,14 @@ class NewTabPageViewController: UIViewController {
feedDataSource: FeedDataSource,
rewards: BraveRewards,
privateBrowsingManager: PrivateBrowsingManager,
p3aUtils: BraveP3AUtils
p3aHelper: NewTabPageP3AHelper
) {
self.tab = tab
self.rewards = rewards
self.feedDataSource = feedDataSource
self.privateBrowsingManager = privateBrowsingManager
self.backgroundButtonsView = NewTabPageBackgroundButtonsView(privateBrowsingManager: privateBrowsingManager)
self.p3aHelper = .init(p3aUtils: p3aUtils)
self.p3aHelper = p3aHelper
background = NewTabPageBackground(dataSource: dataSource)
notifications = NewTabPageNotifications(rewards: rewards)
collectionView = NewTabCollectionView(frame: .zero, collectionViewLayout: layout)
Expand Down