diff --git a/Projects/Core/Services/Sources/Network/FeedAPI/Response/FeedResponse.swift b/Projects/Core/Services/Sources/Network/FeedAPI/Response/FeedResponse.swift index eec9e039..c16cbb81 100644 --- a/Projects/Core/Services/Sources/Network/FeedAPI/Response/FeedResponse.swift +++ b/Projects/Core/Services/Sources/Network/FeedAPI/Response/FeedResponse.swift @@ -10,8 +10,6 @@ import Foundation import Models - - struct FeedResponse: Decodable { let feedId: Int let thumbnailImage: String diff --git a/Projects/Feature/Scene/WebView/BKWebView.swift b/Projects/Feature/Scene/WebView/BKWebView.swift index d95bb3c1..d539e081 100644 --- a/Projects/Feature/Scene/WebView/BKWebView.swift +++ b/Projects/Feature/Scene/WebView/BKWebView.swift @@ -39,23 +39,25 @@ struct BKWebView: UIViewRepresentable { } } -final class Coordinator: NSObject, WKNavigationDelegate { - private let parent: BKWebView - - init(parent: BKWebView) { - self.parent = parent - } - - func webView(_ webView: WKWebView, didCommit navigation: WKNavigation!) { +extension BKWebView { + final class Coordinator: NSObject, WKNavigationDelegate { + private let parent: BKWebView + + init(parent: BKWebView) { + self.parent = parent + } + + func webView(_ webView: WKWebView, didCommit navigation: WKNavigation!) { if let urlString = webView.url?.absoluteString { self.parent.viewModel.title = urlString } + + self.parent.viewModel.canGoBack = webView.canGoBack + self.parent.viewModel.canGoForward = webView.canGoForward + } - self.parent.viewModel.canGoBack = webView.canGoBack - self.parent.viewModel.canGoForward = webView.canGoForward - } - - func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { - self.parent.viewModel.isLoading = false + func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { + self.parent.viewModel.isLoading = false + } } }