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

Commit

Permalink
Show claim rewards notification only for ad grants.
Browse files Browse the repository at this point in the history
  • Loading branch information
iccub committed Jan 20, 2020
1 parent 992f860 commit 92cca40
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class FavoritesViewController: UIViewController, Themeable {

let showClaimRewards = Preferences.NewTabPage.attemptToShowClaimRewardsNotification.value
&& rewardsEnabled
&& rewards.ledger.pendingPromotions.first != nil
&& rewards.ledger.pendingPromotions.first?.type == .ads

if showClaimRewards { return .claimRewards }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class ClaimRewardsNTPNotificationViewController: TranslucentBottomSheet {

guard let rewards = (UIApplication.shared.delegate as? AppDelegate)?
.browserViewController.rewards,
let promo = rewards.ledger.pendingPromotions.first else {
let promo = rewards.ledger.pendingPromotions.first,
promo.type == .ads else {
return nil
}

Expand Down

0 comments on commit 92cca40

Please sign in to comment.