Update unreadCount for an Account only when one of its feeds changes its unreadCount.

This commit is contained in:
Brent Simmons 2018-09-16 19:07:07 -07:00
parent a914b3949b
commit 1c3dca4d9b

View File

@ -524,10 +524,7 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container,
}
@objc func unreadCountDidChange(_ note: Notification) {
// Update the unread count if its a direct child.
if let object = note.object, objectIsChild(object as AnyObject) {
if let feed = note.object as? Feed, feed.account === self {
updateUnreadCount()
}
}