From fd84f8b86106751877b162cea069bf2ee3b9b18c Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 7 Dec 2024 15:13:30 -0800 Subject: [PATCH] Fix several warnings. --- Shared/Activity/ActivityManager.swift | 2 +- Shared/Extensions/NSAttributedString+NetNewsWire.swift | 2 +- Shared/UserNotifications/UserNotificationManager.swift | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Shared/Activity/ActivityManager.swift b/Shared/Activity/ActivityManager.swift index f2d1a9c85..42fcedac0 100644 --- a/Shared/Activity/ActivityManager.swift +++ b/Shared/Activity/ActivityManager.swift @@ -219,7 +219,7 @@ private extension ActivityManager { #if os(iOS) func updateReadArticleSearchAttributes(with article: Article) { - let attributeSet = CSSearchableItemAttributeSet(itemContentType: kUTTypeCompositeContent as String) + let attributeSet = CSSearchableItemAttributeSet(itemContentType: UTType.compositeContent.identifier) attributeSet.title = ArticleStringFormatter.truncatedTitle(article) attributeSet.contentDescription = article.summary attributeSet.keywords = makeKeywords(article) diff --git a/Shared/Extensions/NSAttributedString+NetNewsWire.swift b/Shared/Extensions/NSAttributedString+NetNewsWire.swift index 98fb694b7..bdec2e9f0 100644 --- a/Shared/Extensions/NSAttributedString+NetNewsWire.swift +++ b/Shared/Extensions/NSAttributedString+NetNewsWire.swift @@ -224,7 +224,7 @@ extension NSAttributedString { #if canImport(AppKit) let features: [FontDescriptor.FeatureKey: Any] = [.typeIdentifier: kVerticalPositionType, .selectorIdentifier: forSuperscript ? kSuperiorsSelector : kInferiorsSelector] #else - let features: [FontDescriptor.FeatureKey: Any] = [.featureIdentifier: kVerticalPositionType, .typeIdentifier: forSuperscript ? kSuperiorsSelector : kInferiorsSelector] + let features: [FontDescriptor.FeatureKey: Any] = [.type: kVerticalPositionType, .selector: forSuperscript ? kSuperiorsSelector : kInferiorsSelector] #endif return features } diff --git a/Shared/UserNotifications/UserNotificationManager.swift b/Shared/UserNotifications/UserNotificationManager.swift index e41165405..35523f595 100644 --- a/Shared/UserNotifications/UserNotificationManager.swift +++ b/Shared/UserNotifications/UserNotificationManager.swift @@ -62,8 +62,6 @@ private extension UserNotificationManager { } content.body = ArticleStringFormatter.truncatedSummary(article) content.threadIdentifier = webFeed.webFeedID - content.summaryArgument = "\(webFeed.nameForDisplay)" - content.summaryArgumentCount = 1 content.sound = UNNotificationSound.default content.userInfo = [UserInfoKey.articlePath: article.pathUserInfo] content.categoryIdentifier = "NEW_ARTICLE_NOTIFICATION_CATEGORY"