Remove web provider queue flush on multiplatform
This commit is contained in:
parent
2b0f6f4e77
commit
cdf8ad1277
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue