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

Commit

Permalink
Fix #5357: Add brave-favicon for NTP (#7859)
Browse files Browse the repository at this point in the history
- Add brave-favicon for NTP
  • Loading branch information
Brandon-T authored Aug 10, 2023
1 parent ff67224 commit d4acff4
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 d4acff4

Please sign in to comment.