From 348e176f89fc4d3db2673cc86dfefd06c4d6479f Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Sat, 3 Dec 2022 11:30:21 -0500 Subject: [PATCH] slight code reorg --- .../Sources/MastodonUI/View/Content/StatusCardControl.swift | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/MastodonSDK/Sources/MastodonUI/View/Content/StatusCardControl.swift b/MastodonSDK/Sources/MastodonUI/View/Content/StatusCardControl.swift index 376f54eb4..51c125a87 100644 --- a/MastodonSDK/Sources/MastodonUI/View/Content/StatusCardControl.swift +++ b/MastodonSDK/Sources/MastodonUI/View/Content/StatusCardControl.swift @@ -238,7 +238,7 @@ public final class StatusCardControl: UIControl { } } -extension StatusCardControl { +extension StatusCardControl: WKNavigationDelegate, WKUIDelegate { fileprivate func showWebView() { let webView = setupWebView() webView.loadHTMLString("" + html, baseURL: nil) @@ -247,10 +247,8 @@ extension StatusCardControl { webView.pinTo(to: imageView) } } -} -extension StatusCardControl: WKNavigationDelegate, WKUIDelegate { - fileprivate func setupWebView() -> WKWebView { + private func setupWebView() -> WKWebView { if let webView { return webView } let config = WKWebViewConfiguration()