mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-02-01 11:36:56 +01:00
Change to use the scaled avatar version of the favicon.
This commit is contained in:
parent
b07bf73f78
commit
20dda3727b
@ -165,7 +165,7 @@ private extension ArticleRenderer {
|
||||
return cachedImgTag
|
||||
}
|
||||
|
||||
if let favicon = appDelegate.faviconDownloader.favicon(for: feed) {
|
||||
if let favicon = appDelegate.faviconDownloader.faviconAsAvatar(for: feed) {
|
||||
if let s = base64String(forImage: favicon) {
|
||||
var dimension = min(favicon.size.height, CGFloat(ArticleRenderer.avatarDimension)) // Assuming square images.
|
||||
dimension = max(dimension, 16) // Some favicons say they’re < 16. Force them larger.
|
||||
@ -210,6 +210,7 @@ private extension ArticleRenderer {
|
||||
}
|
||||
|
||||
func base64String(forImage image: RSImage) -> String? {
|
||||
print("height: \(image.size.height) width: \(image.size.width)")
|
||||
return image.dataRepresentation()?.base64EncodedString()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user