Remove web provider queue flush on multiplatform

This commit is contained in:
Maurice Parker 2020-07-16 13:44:19 -05:00
parent 2b0f6f4e77
commit cdf8ad1277
2 changed files with 0 additions and 35 deletions

View File

@ -23,10 +23,6 @@ class WebViewProvider: NSObject {
super.init()
replenishQueueIfNeeded()
}
func flushQueue() {
operationQueue.add(WebViewProviderFlushQueueOperation(queue: queue))
}
func replenishQueueIfNeeded() {
operationQueue.add(WebViewProviderReplenishQueueOperation(queue: queue, articleIconSchemeHandler: articleIconSchemeHandler))
@ -39,28 +35,6 @@ class WebViewProvider: NSObject {
}
class WebViewProviderFlushQueueOperation: MainThreadOperation {
// MainThreadOperation
public var isCanceled = false
public var id: Int?
public weak var operationDelegate: MainThreadOperationDelegate?
public var name: String? = "WebViewProviderFlushQueueOperation"
public var completionBlock: MainThreadOperation.MainThreadOperationCompletionBlock?
private var queue: NSMutableArray
init(queue: NSMutableArray) {
self.queue = queue
}
func run() {
queue.removeAllObjects()
self.operationDelegate?.operationDidComplete(self)
}
}
class WebViewProviderReplenishQueueOperation: MainThreadOperation {
// MainThreadOperation

View File

@ -154,15 +154,6 @@ private extension ArticleViewController {
return controller
}
func resetWebViewController() {
sceneModel?.webViewProvider?.flushQueue()
sceneModel?.webViewProvider?.replenishQueueIfNeeded()
if let controller = currentWebViewController {
controller.fullReload()
self.pageViewController.setViewControllers([controller], direction: .forward, animated: false, completion: nil)
}
}
}
public extension Notification.Name {