From 20dda3727ba1704ab6e757b8cd0ac8d5559de6b3 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sun, 15 Sep 2019 04:05:11 -0500 Subject: [PATCH] Change to use the scaled avatar version of the favicon. --- Shared/Article Rendering/ArticleRenderer.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Shared/Article Rendering/ArticleRenderer.swift b/Shared/Article Rendering/ArticleRenderer.swift index 833228120..bb7fedc7a 100644 --- a/Shared/Article Rendering/ArticleRenderer.swift +++ b/Shared/Article Rendering/ArticleRenderer.swift @@ -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() }