mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-23 16:20:53 +01:00
Change to work with only article id's. Issue #1595
This commit is contained in:
parent
911d4ed248
commit
a8951089c3
@ -32,10 +32,10 @@ final class UserNotificationManager: NSObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@objc func statusesDidChange(_ note: Notification) {
|
@objc func statusesDidChange(_ note: Notification) {
|
||||||
guard let articles = note.userInfo?[Account.UserInfoKey.articles] as? Set<Article> else {
|
guard let articleIDs = note.userInfo?[Account.UserInfoKey.articleIDs] as? Set<String>, !articleIDs.isEmpty else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let identifiers = articles.filter({ $0.status.read }).map { "articleID:\($0.articleID)" }
|
let identifiers = articleIDs.map { "articleID:\($0)" }
|
||||||
UNUserNotificationCenter.current().removeDeliveredNotifications(withIdentifiers: identifiers)
|
UNUserNotificationCenter.current().removeDeliveredNotifications(withIdentifiers: identifiers)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user