mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-02-09 00:28:53 +01:00
Remove web provider queue flush on multiplatform
This commit is contained in:
parent
2b0f6f4e77
commit
cdf8ad1277
@ -24,10 +24,6 @@ class WebViewProvider: NSObject {
|
|||||||
replenishQueueIfNeeded()
|
replenishQueueIfNeeded()
|
||||||
}
|
}
|
||||||
|
|
||||||
func flushQueue() {
|
|
||||||
operationQueue.add(WebViewProviderFlushQueueOperation(queue: queue))
|
|
||||||
}
|
|
||||||
|
|
||||||
func replenishQueueIfNeeded() {
|
func replenishQueueIfNeeded() {
|
||||||
operationQueue.add(WebViewProviderReplenishQueueOperation(queue: queue, articleIconSchemeHandler: articleIconSchemeHandler))
|
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 {
|
class WebViewProviderReplenishQueueOperation: MainThreadOperation {
|
||||||
|
|
||||||
// MainThreadOperation
|
// MainThreadOperation
|
||||||
|
@ -154,15 +154,6 @@ private extension ArticleViewController {
|
|||||||
return controller
|
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 {
|
public extension Notification.Name {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user