mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-02 18:32:55 +00:00
Clean whitespace-only lines.
This commit is contained in:
1 parent
9827300a9a
commit
9efde554d4
452 files changed
+5354
-5354
No files matched your search
@@ -41,7 +41,7 @@ final class UserNotificationManager {
|
||||
guard let articles = note.userInfo?[Account.UserInfoKey.newArticles] as? Set<Article> else {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
for article in articles {
|
||||
if !article.status.read, let feed = article.feed, feed.isNotifyAboutNewArticles ?? false {
|
||||
sendNotification(feed: feed, article: article)
|
||||
@@ -55,7 +55,7 @@ final class UserNotificationManager {
|
||||
UNUserNotificationCenter.current().removeDeliveredNotifications(withIdentifiers: identifiers)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if let articleIDs = note.userInfo?[Account.UserInfoKey.articleIDs] as? Set<String>,
|
||||
let statusKey = note.userInfo?[Account.UserInfoKey.statusKey] as? ArticleStatus.Key,
|
||||
let flag = note.userInfo?[Account.UserInfoKey.statusFlag] as? Bool,
|
||||
@@ -71,7 +71,7 @@ private extension UserNotificationManager {
|
||||
|
||||
func sendNotification(feed: Feed, article: Article) {
|
||||
let content = UNMutableNotificationContent()
|
||||
|
||||
|
||||
content.title = feed.nameForDisplay
|
||||
if !ArticleStringFormatter.truncatedTitle(article).isEmpty {
|
||||
content.subtitle = ArticleStringFormatter.truncatedTitle(article)
|
||||
@@ -84,11 +84,11 @@ private extension UserNotificationManager {
|
||||
if let attachment = thumbnailAttachment(for: article, feed: feed) {
|
||||
content.attachments.append(attachment)
|
||||
}
|
||||
|
||||
|
||||
let request = UNNotificationRequest.init(identifier: "articleID:\(article.articleID)", content: content, trigger: nil)
|
||||
UNUserNotificationCenter.current().add(request)
|
||||
}
|
||||
|
||||
|
||||
/// Determine if there is an available icon for the article. This will then move it to the caches directory and make it avialble for the notification.
|
||||
/// - Parameters:
|
||||
/// - article: `Article`
|
||||
@@ -102,7 +102,7 @@ private extension UserNotificationManager {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
func registerCategoriesAndActions() {
|
||||
let readAction = UNNotificationAction(identifier: ActionIdentifier.markAsRead, title: NSLocalizedString("Mark as Read", comment: "Mark as Read"), options: [])
|
||||
let starredAction = UNNotificationAction(identifier: ActionIdentifier.markAsStarred, title: NSLocalizedString("Mark as Starred", comment: "Mark as Starred"), options: [])
|
||||
|
||||
Reference in new issue
Block a user