Update pseudo feed timeline when and account is deleted.

This commit is contained in:
Maurice Parker 2019-05-21 16:47:32 -05:00
parent 918eb746d5
commit 98a262e34b

View File

@ -145,6 +145,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner {
NotificationCenter.default.addObserver(self, selector: #selector(imageDidBecomeAvailable(_:)), name: .FaviconDidBecomeAvailable, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(accountDidDownloadArticles(_:)), name: .AccountDidDownloadArticles, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(accountStateDidChange(_:)), name: .AccountStateDidChange, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(accountsDidChange(_:)), name: .AccountsDidChange, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(userDefaultsDidChange(_:)), name: UserDefaults.didChangeNotification, object: nil)
didRegisterForNotifications = true
@ -499,6 +500,12 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner {
}
}
@objc func accountsDidChange(_ note: Notification) {
if representedObjectsContainsAnyPseudoFeed() {
fetchArticles()
}
}
@objc func userDefaultsDidChange(_ note: Notification) {
self.fontSize = AppDefaults.timelineFontSize