From 98a262e34be6de155ddb0a37f4886967ad0e224b Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Tue, 21 May 2019 16:47:32 -0500 Subject: [PATCH] Update pseudo feed timeline when and account is deleted. --- Mac/MainWindow/Timeline/TimelineViewController.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Mac/MainWindow/Timeline/TimelineViewController.swift b/Mac/MainWindow/Timeline/TimelineViewController.swift index d8438e954..1aa349a86 100644 --- a/Mac/MainWindow/Timeline/TimelineViewController.swift +++ b/Mac/MainWindow/Timeline/TimelineViewController.swift @@ -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