Merge branch 'bug/4523-bad-images'

This commit is contained in:
Brent Simmons committed 2025-09-09 20:54:06 -07:00
commit ad74aaa3da
2 files changed
+10 -10

No files matched your search

@@ -10,7 +10,10 @@
import AppKit
public class RSScreen {
public static var maxScreenScale = CGFloat(2)
public static var maxScreenScale: CGFloat {
NSScreen.screens.map(\.backingScaleFactor).max() ?? 2.0
}
}
#endif
+6 -9
View File
@@ -97,19 +97,16 @@ final class FaviconDownloader {
}
func faviconAsIcon(for webFeed: WebFeed) -> IconImage? {
if let image = cache[webFeed] {
return image
}
if let iconImage = favicon(for: webFeed), let imageData = iconImage.image.dataRepresentation() {
if let scaledImage = RSImage.scaledForIcon(imageData) {
let scaledIconImage = IconImage(scaledImage)
cache[webFeed] = scaledIconImage
return scaledIconImage
}
if let iconImage = favicon(for: webFeed) {
cache[webFeed] = iconImage
return iconImage
}
return nil
}