From 1c3dca4d9b707172d74595898e0e1638ac237426 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sun, 16 Sep 2018 19:07:07 -0700 Subject: [PATCH] Update unreadCount for an Account only when one of its feeds changes its unreadCount. --- Frameworks/Account/Account.swift | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Frameworks/Account/Account.swift b/Frameworks/Account/Account.swift index a70e6873e..70e234ed9 100644 --- a/Frameworks/Account/Account.swift +++ b/Frameworks/Account/Account.swift @@ -524,10 +524,7 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container, } @objc func unreadCountDidChange(_ note: Notification) { - - // Update the unread count if it’s a direct child. - - if let object = note.object, objectIsChild(object as AnyObject) { + if let feed = note.object as? Feed, feed.account === self { updateUnreadCount() } }