diff --git a/Shared/UserNotifications/UserNotificationManager.swift b/Shared/UserNotifications/UserNotificationManager.swift index 04505b66f..2f37a2438 100644 --- a/Shared/UserNotifications/UserNotificationManager.swift +++ b/Shared/UserNotifications/UserNotificationManager.swift @@ -32,10 +32,10 @@ final class UserNotificationManager: NSObject { } @objc func statusesDidChange(_ note: Notification) { - guard let articles = note.userInfo?[Account.UserInfoKey.articles] as? Set
else { + guard let articleIDs = note.userInfo?[Account.UserInfoKey.articleIDs] as? Set, !articleIDs.isEmpty else { return } - let identifiers = articles.filter({ $0.status.read }).map { "articleID:\($0.articleID)" } + let identifiers = articleIDs.map { "articleID:\($0)" } UNUserNotificationCenter.current().removeDeliveredNotifications(withIdentifiers: identifiers) }