mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-05 19:57:31 +00:00
Resolve issue where we could have a web view deallocated before getting displayed.
This commit is contained in:
1 parent
acaeb4164a
commit
cf8dbb26f7
7 files changed
+94
-91
No files matched your search
@@ -86,9 +86,7 @@ class WebViewProviderDequeueOperation: MainThreadOperation {
|
||||
|
||||
func run() {
|
||||
if let webView = queue.lastObject as? PreloadedWebView {
|
||||
webView.ready { preloadedWebView in
|
||||
self.completion(preloadedWebView)
|
||||
}
|
||||
self.completion(webView)
|
||||
self.queue.remove(webView)
|
||||
self.operationDelegate?.operationDidComplete(self)
|
||||
return
|
||||
@@ -98,9 +96,7 @@ class WebViewProviderDequeueOperation: MainThreadOperation {
|
||||
|
||||
let webView = PreloadedWebView(articleIconSchemeHandler: articleIconSchemeHandler)
|
||||
webView.preload()
|
||||
webView.ready { preloadedWebView in
|
||||
self.completion(preloadedWebView)
|
||||
}
|
||||
self.completion(webView)
|
||||
self.operationDelegate?.operationDidComplete(self)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user