From f7c9cc1dbdb1bcc63d12cf25771dd632232c70a5 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Mon, 16 Sep 2019 22:09:58 -0700 Subject: [PATCH] Remove no-longer needed machinery for updating the timeline on dark-mode/light-mode appearance changes. --- .../Timeline/TimelineViewController.swift | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/Mac/MainWindow/Timeline/TimelineViewController.swift b/Mac/MainWindow/Timeline/TimelineViewController.swift index 4b770b8e6..b9c8df705 100644 --- a/Mac/MainWindow/Timeline/TimelineViewController.swift +++ b/Mac/MainWindow/Timeline/TimelineViewController.swift @@ -11,10 +11,6 @@ import RSCore import Articles import Account -extension Notification.Name { - static let AppleInterfaceThemeChangedNotification = Notification.Name("AppleInterfaceThemeChangedNotification") -} - protocol TimelineDelegate: class { func timelineSelectionDidChange(_: TimelineViewController, selectedArticles: [Article]?) } @@ -174,9 +170,8 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr NotificationCenter.default.addObserver(self, selector: #selector(accountsDidChange(_:)), name: .AccountsDidChange, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(containerChildrenDidChange(_:)), name: .ChildrenDidChange, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(userDefaultsDidChange(_:)), name: UserDefaults.didChangeNotification, object: nil) - DistributedNotificationCenter.default.addObserver(self, selector: #selector(appleInterfaceThemeChanged), name: .AppleInterfaceThemeChangedNotification, object: nil) - didRegisterForNotifications = true + didRegisterForNotifications = true } } @@ -556,15 +551,6 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr self.sortDirection = AppDefaults.timelineSortDirection } - @objc func appleInterfaceThemeChanged(_ note: Notification) { - appDelegate.authorAvatarDownloader.resetCache() - appDelegate.feedIconDownloader.resetCache() - appDelegate.faviconDownloader.resetCache() - performBlockAndRestoreSelection { - tableView.reloadData() - } - } - // MARK: - Reloading Data private func cellForRowView(_ rowView: NSView) -> NSView? {