Skip to content

Commit

Permalink
indicate when a track has been blocked while scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
brindy committed Nov 12, 2024
1 parent 4ed25d1 commit ae8831c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions DuckDuckGo/TabViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2574,6 +2574,19 @@ extension TabViewController: ContentBlockerRulesUserScriptDelegate {
Pixel.fire(pixel: .daxDialogsWithoutTrackersFollowUp)
}

let blockedImage = UIImageView(image: UIImage(systemName: "hand.raised.fill"))
blockedImage.frame.origin = CGPoint(x: view.frame.size.width - 30, y: view.frame.size.height)
view.addSubview(blockedImage)
UIView.animate(withDuration: 3.0) {
blockedImage.frame.origin = CGPoint(x: self.view.frame.size.width - 30, y: self.view.frame.size.height / 2)
}

UIView.animate(withDuration: 0.3, delay: 2.0) {
blockedImage.alpha = 0.0
} completion: { _ in
blockedImage.removeFromSuperview()
}

privacyInfo?.trackerInfo.addDetectedTracker(tracker, onPageWithURL: url)
}
}
Expand Down

0 comments on commit ae8831c

Please sign in to comment.