Fix issue where web views that never readied themselves would clog up the queue.

This commit is contained in:
Maurice Parker 2020-09-01 18:27:55 -05:00
parent fee08ef187
commit acaeb4164a
2 changed files with 2 additions and 2 deletions

View File

@ -88,8 +88,8 @@ class WebViewProviderDequeueOperation: MainThreadOperation {
if let webView = queue.lastObject as? PreloadedWebView { if let webView = queue.lastObject as? PreloadedWebView {
webView.ready { preloadedWebView in webView.ready { preloadedWebView in
self.completion(preloadedWebView) self.completion(preloadedWebView)
self.queue.remove(webView)
} }
self.queue.remove(webView)
self.operationDelegate?.operationDidComplete(self) self.operationDelegate?.operationDidComplete(self)
return return
} }

View File

@ -88,8 +88,8 @@ class WebViewProviderDequeueOperation: MainThreadOperation {
if let webView = queue.lastObject as? PreloadedWebView { if let webView = queue.lastObject as? PreloadedWebView {
webView.ready { preloadedWebView in webView.ready { preloadedWebView in
self.completion(preloadedWebView) self.completion(preloadedWebView)
self.queue.remove(webView)
} }
self.queue.remove(webView)
self.operationDelegate?.operationDidComplete(self) self.operationDelegate?.operationDidComplete(self)
return return
} }