reorged the send notification code

This commit is contained in:
Stuart Breckenridge 2020-05-15 20:32:33 +08:00
parent 23ee6761ca
commit fa51fa47b4
No known key found for this signature in database
GPG Key ID: 977FF9C8CE7AB207
1 changed files with 5 additions and 5 deletions

View File

@ -53,15 +53,15 @@ private extension UserNotificationManager {
}
content.body = ArticleStringFormatter.truncatedSummary(article)
content.sound = UNNotificationSound.default
content.userInfo = [UserInfoKey.articlePath: article.pathUserInfo]
content.threadIdentifier = webFeed.webFeedID
content.summaryArgument = "\(webFeed.nameForDisplay)"
content.summaryArgumentCount = 1
let request = UNNotificationRequest.init(identifier: "articleID:\(article.articleID)", content: content, trigger: nil)
content.sound = UNNotificationSound.default
content.userInfo = [UserInfoKey.articlePath: article.pathUserInfo]
let request = UNNotificationRequest.init(identifier: "articleID:\(article.articleID)", content: content, trigger: nil)
UNUserNotificationCenter.current().add(request)
}