mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Change media embed priority to be lower than video previews
This commit is contained in:
@@ -69,10 +69,6 @@ struct RedditLinkData: Codable {
|
||||
func renderURLAsHTML() -> String? {
|
||||
guard let url = url else { return nil }
|
||||
|
||||
if !url.hasPrefix("https://imgur.com"), let mediaEmbedContent = mediaEmbed?.content {
|
||||
return mediaEmbedContent
|
||||
}
|
||||
|
||||
if url.hasSuffix(".gif") {
|
||||
return "<figure><img src=\"\(url)\"></figure>"
|
||||
}
|
||||
@@ -102,6 +98,10 @@ struct RedditLinkData: Codable {
|
||||
return html
|
||||
}
|
||||
|
||||
if let mediaEmbedContent = mediaEmbed?.content {
|
||||
return mediaEmbedContent
|
||||
}
|
||||
|
||||
if let imageSource = preview?.images?.first?.source, let imageURL = imageSource.url {
|
||||
var html = "<figure><a href=\"\(url)\"><img src=\"\(imageURL)\" "
|
||||
if let width = imageSource.width, let height = imageSource.height {
|
||||
|
||||
Reference in New Issue
Block a user