Skip to content

Commit

Permalink
Update privacy icon for special error pages
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandroboron committed Dec 11, 2024
1 parent b6dbf5c commit 64472a3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions DuckDuckGo/OmniBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ extension OmniBar: NibLoading {}

public enum OmniBarIcon: String {
case duckPlayer = "DuckPlayerURLIcon"
case specialError = "Globe-24"
}

class OmniBar: UIView {
Expand Down Expand Up @@ -300,10 +301,15 @@ class OmniBar: UIView {
showCustomIcon(icon: .duckPlayer)
return
}

privacyInfoContainer.privacyIcon.isHidden = privacyInfo.isSpecialErrorPageVisible

if privacyInfo.isSpecialErrorPageVisible {
showCustomIcon(icon: .specialError)
return
}

let icon = PrivacyIconLogic.privacyIcon(for: privacyInfo)
privacyInfoContainer.privacyIcon.updateIcon(icon)
privacyInfoContainer.privacyIcon.isHidden = false
customIconView.isHidden = true
}

Expand Down

0 comments on commit 64472a3

Please sign in to comment.