Coalesce unread count backing store rebuilds to prevent feeds list flickering while syncing and the feeds filter is engaged. (Regression)
This commit is contained in:
parent
d222a9f617
commit
a4bbf65944
|
@ -61,6 +61,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider {
|
|||
private var wasRootSplitViewControllerCollapsed = false
|
||||
|
||||
private let fetchAndMergeArticlesQueue = CoalescingQueue(name: "Fetch and Merge Articles", interval: 0.5)
|
||||
private let rebuildBackingStoresWithMergeQueue = CoalescingQueue(name: "Rebuild The Backing Stores by Merging", interval: 0.5)
|
||||
private var fetchSerialNumber = 0
|
||||
private let fetchRequestQueue = FetchRequestQueue()
|
||||
|
||||
|
@ -445,9 +446,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider {
|
|||
return
|
||||
}
|
||||
|
||||
addShadowTableToFilterExceptions()
|
||||
rebuildBackingStores()
|
||||
treeControllerDelegate.resetFilterExceptions()
|
||||
rebuildBackingStoresWithMergeQueue.add(self, #selector(rebuildBackingStoresWithMerge))
|
||||
}
|
||||
|
||||
@objc func statusesDidChange(_ note: Notification) {
|
||||
|
@ -569,6 +568,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider {
|
|||
|
||||
func suspend() {
|
||||
fetchAndMergeArticlesQueue.performCallsImmediately()
|
||||
rebuildBackingStoresWithMergeQueue.performCallsImmediately()
|
||||
fetchRequestQueue.cancelAllRequests()
|
||||
}
|
||||
|
||||
|
@ -1362,6 +1362,12 @@ private extension SceneCoordinator {
|
|||
}
|
||||
}
|
||||
|
||||
@objc func rebuildBackingStoresWithMerge() {
|
||||
addShadowTableToFilterExceptions()
|
||||
rebuildBackingStores()
|
||||
treeControllerDelegate.resetFilterExceptions()
|
||||
}
|
||||
|
||||
func rebuildShadowTable() {
|
||||
shadowTable = [[Node]]()
|
||||
|
||||
|
|
Loading…
Reference in New Issue