Use CoalescingQueue.standard instead of one created by AppDelegate.

This commit is contained in:
Brent Simmons 2018-02-17 17:45:05 -08:00
parent 3a94cf9a51
commit c5ed540194
5 changed files with 5 additions and 5 deletions

View File

@ -26,7 +26,6 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
var authorAvatarDownloader: AuthorAvatarDownloader!
var feedIconDownloader: FeedIconDownloader!
var appName: String!
var coalescingQueue = CoalescingQueue(name: "UI Queue", interval: 0.05)
@IBOutlet var debugMenuItem: NSMenuItem!
@IBOutlet var sortByOldestArticleOnTopMenuItem: NSMenuItem!

View File

@ -15,7 +15,7 @@ import RSCore
func update() {
appDelegate?.coalescingQueue.add(self, #selector(updateBadge))
CoalescingQueue.standard.add(self, #selector(updateBadge))
}
@objc func updateBadge() {

View File

@ -9,6 +9,7 @@
import AppKit
import Data
import Account
import RSCore
private let kWindowFrameKey = "MainWindow"
@ -120,7 +121,7 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
@objc func refreshProgressDidChange(_ note: Notification) {
appDelegate?.coalescingQueue.add(self, #selector(makeToolbarValidate))
CoalescingQueue.standard.add(self, #selector(makeToolbarValidate))
}
@objc func unreadCountDidChange(_ note: Notification) {

View File

@ -613,7 +613,7 @@ private extension TimelineViewController {
func queueReloadAvailableCells() {
appDelegate.coalescingQueue.add(self, #selector(reloadAvailableCells))
CoalescingQueue.standard.add(self, #selector(reloadAvailableCells))
}
func updateTableViewRowHeight() {

View File

@ -74,7 +74,7 @@ private extension SmartFeed {
func queueFetchUnreadCounts() {
appDelegate?.coalescingQueue.add(self, #selector(fetchUnreadCounts))
CoalescingQueue.standard.add(self, #selector(fetchUnreadCounts))
}
func fetchUnreadCount(for account: Account) {