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

Always run brave ads if ShouldAlwaysRunBraveAdsService feature is true #8699

Closed
wants to merge 1 commit into from
Closed
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 @@ -345,7 +345,7 @@
}

rewards.ads.captchaHandler = self
let shouldStartAds = rewards.ads.isEnabled || Preferences.BraveNews.isEnabled.value
let shouldStartAds = rewards.ads.isEnabled || Preferences.BraveNews.isEnabled.value || BraveAds.shouldAlwaysRunService()

Check failure on line 348 in Sources/Brave/Frontend/Browser/BrowserViewController/BrowserViewController.swift

View workflow job for this annotation

GitHub Actions / Run tests

type 'BraveAds' has no member 'shouldAlwaysRunService'

Check failure on line 348 in Sources/Brave/Frontend/Browser/BrowserViewController/BrowserViewController.swift

View workflow job for this annotation

GitHub Actions / Run tests

type 'BraveAds' has no member 'shouldAlwaysRunService'
if shouldStartAds {
// Only start rewards service automatically if ads is enabled
if rewards.isEnabled {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Brave/Frontend/Rewards/BraveRewards.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public class BraveRewards: NSObject {
private var braveNewsObservation: AnyCancellable?

private var shouldShutdownAds: Bool {
ads.isServiceRunning() && !ads.isEnabled && !Preferences.BraveNews.isEnabled.value
ads.isServiceRunning() && !ads.isEnabled && !Preferences.BraveNews.isEnabled.value && !BraveAds.shouldAlwaysRunService()
}

/// Propose that the ads service should be shutdown based on whether or not that all features
Expand Down
Loading