Skip to content

Commit

Permalink
Fix brave/brave-ios#5357: Add brave-favicon for NTP (brave/brave-ios#…
Browse files Browse the repository at this point in the history
…7859)

- Add brave-favicon for NTP
  • Loading branch information
Brandon-T authored Aug 10, 2023
1 parent 68d4d4f commit 82aad80
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Sources/Brave/Frontend/Browser/Tab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,11 @@ class Tab: NSObject {
}

var displayFavicon: Favicon? {
if let url = url, InternalURL(url)?.isAboutHomeURL == true { return nil }
if let url = url, InternalURL(url)?.isAboutHomeURL == true {
return Favicon(image: UIImage(sharedNamed: "brave.logo"),
isMonogramImage: false,
backgroundColor: .clear)
}
return favicon
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class TabCell: UICollectionViewCell {
}

titleLabel.text = tab.displayTitle
favicon.image = Favicon.defaultImage
favicon.image = tab.displayFavicon?.image ?? Favicon.defaultImage

if !tab.displayTitle.isEmpty {
accessibilityLabel = tab.displayTitle
Expand Down

0 comments on commit 82aad80

Please sign in to comment.