From 9e235564af591480a2f1536d7f5cd914e6be9ff9 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Wed, 6 May 2020 13:21:37 -0500 Subject: [PATCH] Change media embed priority to be lower than video previews --- Frameworks/Account/FeedProvider/Reddit/RedditLink.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Frameworks/Account/FeedProvider/Reddit/RedditLink.swift b/Frameworks/Account/FeedProvider/Reddit/RedditLink.swift index 3b69f8020..c98a4eb67 100644 --- a/Frameworks/Account/FeedProvider/Reddit/RedditLink.swift +++ b/Frameworks/Account/FeedProvider/Reddit/RedditLink.swift @@ -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 "
" } @@ -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 = "