Skip to content

Commit

Permalink
feat: Updated SkierScribbler/src/Interface/WebView
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] committed Nov 9, 2023
1 parent 54e7093 commit f7f2105
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions SkierScribbler/src/Interface/WebView/WebViewBridge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Foundation
import UIKit
import SwiftUI
import WebKit
import WebFilter

struct WebViewBridge: UIViewRepresentable {

Expand Down Expand Up @@ -48,8 +49,14 @@ struct WebViewBridge: UIViewRepresentable {

func updateUIView(_ uiView: WKWebView, context: Context) {
let request = URLRequest(url: url)

uiView.load(request)

if url.isArticleURL {
uiView.load(request)
} else {
Sheet(isPresented: .constant(true)) {
WebViewBridge(url: .constant(url), percentLoaded: $percentLoaded, isDoneLoading: $isDoneLoading)
}
}
}

func makeCoordinator() -> Coordinator {
Expand Down

0 comments on commit f7f2105

Please sign in to comment.