From 5af264347997ea4fd60e067f1aedfbee053a2062 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Mon, 19 Apr 2021 11:21:00 +0800 Subject: [PATCH] standardised naming --- Account/Sources/Account/WebFeed.swift | 2 +- Mac/Inspector/WebFeedInspectorViewController.swift | 2 +- .../Sidebar/SidebarViewController+ContextualMenus.swift | 2 +- iOS/Inspector/WebFeedInspectorViewController.swift | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Account/Sources/Account/WebFeed.swift b/Account/Sources/Account/WebFeed.swift index 1d173c139..d3a2604fe 100644 --- a/Account/Sources/Account/WebFeed.swift +++ b/Account/Sources/Account/WebFeed.swift @@ -242,7 +242,7 @@ public final class WebFeed: Feed, Renamable, Hashable { } // MARK: - NotificationDisplayName - public var notifyNameDisplay: String { + public var notificationDisplayName: String { #if os(macOS) if self.url.contains("twitter.com") { return NSLocalizedString("Show notifications for new tweets", comment: "notifyNameDisplay / Twitter") diff --git a/Mac/Inspector/WebFeedInspectorViewController.swift b/Mac/Inspector/WebFeedInspectorViewController.swift index 4ad0b1779..cd28699b8 100644 --- a/Mac/Inspector/WebFeedInspectorViewController.swift +++ b/Mac/Inspector/WebFeedInspectorViewController.swift @@ -183,7 +183,7 @@ private extension WebFeedInspectorViewController { } func updateNotifyAboutNewArticles() { - isNotifyAboutNewArticlesCheckBox?.title = feed?.notifyNameDisplay ?? NSLocalizedString("Show notifications for new articles", comment: "Show notifications for new articles") + isNotifyAboutNewArticlesCheckBox?.title = feed?.notificationDisplayName ?? NSLocalizedString("Show notifications for new articles", comment: "Show notifications for new articles") isNotifyAboutNewArticlesCheckBox?.state = (feed?.isNotifyAboutNewArticles ?? false) ? .on : .off } diff --git a/Mac/MainWindow/Sidebar/SidebarViewController+ContextualMenus.swift b/Mac/MainWindow/Sidebar/SidebarViewController+ContextualMenus.swift index 998154875..46286cd64 100644 --- a/Mac/MainWindow/Sidebar/SidebarViewController+ContextualMenus.swift +++ b/Mac/MainWindow/Sidebar/SidebarViewController+ContextualMenus.swift @@ -230,7 +230,7 @@ private extension SidebarViewController { } menu.addItem(NSMenuItem.separator()) - let notificationText = webFeed.notifyNameDisplay.capitalized + let notificationText = webFeed.notificationDisplayName.capitalized let notificationMenuItem = menuItem(notificationText, #selector(toggleNotificationsFromContextMenu(_:)), webFeed) if webFeed.isNotifyAboutNewArticles == nil || webFeed.isNotifyAboutNewArticles! == false { diff --git a/iOS/Inspector/WebFeedInspectorViewController.swift b/iOS/Inspector/WebFeedInspectorViewController.swift index 8265bb1d2..048514ab1 100644 --- a/iOS/Inspector/WebFeedInspectorViewController.swift +++ b/iOS/Inspector/WebFeedInspectorViewController.swift @@ -162,7 +162,7 @@ extension WebFeedInspectorViewController { return cell } label.numberOfLines = 2 - label.text = webFeed.notifyNameDisplay.capitalized + label.text = webFeed.notificationDisplayName.capitalized } return cell }