Don't insert the web view into the queue until the preload process has already started.

This commit is contained in:
Maurice Parker 2020-08-26 18:08:43 -05:00
parent c1b108f541
commit 4c221058d8
2 changed files with 2 additions and 2 deletions

View File

@ -57,8 +57,8 @@ class WebViewProviderReplenishQueueOperation: MainThreadOperation {
func run() {
while queue.count < minimumQueueDepth {
let webView = PreloadedWebView(articleIconSchemeHandler: articleIconSchemeHandler)
queue.insert(webView, at: 0)
webView.preload()
queue.insert(webView, at: 0)
}
self.operationDelegate?.operationDidComplete(self)
}

View File

@ -57,8 +57,8 @@ class WebViewProviderReplenishQueueOperation: MainThreadOperation {
func run() {
while queue.count < minimumQueueDepth {
let webView = PreloadedWebView(articleIconSchemeHandler: articleIconSchemeHandler)
queue.insert(webView, at: 0)
webView.preload()
queue.insert(webView, at: 0)
}
self.operationDelegate?.operationDidComplete(self)
}