diff --git a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReader.swift b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReader.swift index e38dd8c95..79b21e94e 100644 --- a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReader.swift +++ b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReader.swift @@ -6,7 +6,8 @@ import WebKit #if os(iOS) struct WebReader: UIViewRepresentable { - let articleContent: ArticleContentDep + let htmlContent: String + let highlightsJSONString: String let item: FeedItemDep let openLinkAction: (URL) -> Void let webViewActionHandler: (WKScriptMessage, WKScriptMessageReplyHandler?) -> Void @@ -99,7 +100,8 @@ import WebKit func loadContent(webView: WKWebView) { webView.loadHTMLString( WebReaderContent( - articleContent: articleContent, + htmlContent: htmlContent, + highlightsJSONString: highlightsJSONString, item: item, isDark: UITraitCollection.current.userInterfaceStyle == .dark, fontSize: fontSize() diff --git a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift index dbfadd324..11d93d20e 100644 --- a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift +++ b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift @@ -149,7 +149,8 @@ import WebKit ZStack { if let articleContent = viewModel.articleContent { WebReader( - articleContent: articleContent, + htmlContent: articleContent.htmlContent, + highlightsJSONString: articleContent.highlightsJSONString, item: item, openLinkAction: { #if os(macOS) diff --git a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContent.swift b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContent.swift index 42a2f1a26..1c47fe344 100644 --- a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContent.swift +++ b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContent.swift @@ -4,18 +4,21 @@ import Utils struct WebReaderContent { let textFontSize: Int - let articleContent: ArticleContentDep + let htmlContent: String + let highlightsJSONString: String let item: FeedItemDep let themeKey: String init( - articleContent: ArticleContentDep, + htmlContent: String, + highlightsJSONString: String, item: FeedItemDep, isDark: Bool, fontSize: Int ) { self.textFontSize = fontSize - self.articleContent = articleContent + self.htmlContent = htmlContent + self.highlightsJSONString = highlightsJSONString self.item = item self.themeKey = isDark ? "Gray" : "LightGray" } @@ -39,7 +42,7 @@ struct WebReaderContent {