slight code reorg

This commit is contained in:
Jed Fox 2022-12-03 11:30:21 -05:00
parent e46c25892d
commit 348e176f89
No known key found for this signature in database
GPG Key ID: 0B61D18EA54B47E1
1 changed files with 2 additions and 4 deletions

View File

@ -238,7 +238,7 @@ public final class StatusCardControl: UIControl {
}
}
extension StatusCardControl {
extension StatusCardControl: WKNavigationDelegate, WKUIDelegate {
fileprivate func showWebView() {
let webView = setupWebView()
webView.loadHTMLString("<meta name='viewport' content='width=device-width,user-scalable=no'><style>body { margin: 0; color-scheme: light dark; } body > :only-child { width: 100vw !important; height: 100vh !important }</style>" + 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()