From ddb0ee21b644ed641073e0c937feef30a7b145aa Mon Sep 17 00:00:00 2001 From: Daniel Jalkut Date: Tue, 12 Feb 2019 10:04:18 -0500 Subject: [PATCH] Quiet warnings/errors from Xcode 10.2 about redundant public attributes on methods implemented inside public extensions. --- Frameworks/Account/Account.swift | 10 +++++----- Frameworks/Account/DataExtensions.swift | 8 ++++---- Frameworks/Account/UnreadCountProvider.swift | 6 +++--- Frameworks/Articles/Article.swift | 6 +++--- Frameworks/Articles/ArticleStatus.swift | 4 ++-- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Frameworks/Account/Account.swift b/Frameworks/Account/Account.swift index 6fa17c6f1..31654ea8b 100644 --- a/Frameworks/Account/Account.swift +++ b/Frameworks/Account/Account.swift @@ -16,12 +16,12 @@ import RSDatabase public extension Notification.Name { - public static let AccountRefreshDidBegin = Notification.Name(rawValue: "AccountRefreshDidBegin") - public static let AccountRefreshDidFinish = Notification.Name(rawValue: "AccountRefreshDidFinish") - public static let AccountRefreshProgressDidChange = Notification.Name(rawValue: "AccountRefreshProgressDidChange") - public static let AccountDidDownloadArticles = Notification.Name(rawValue: "AccountDidDownloadArticles") + static let AccountRefreshDidBegin = Notification.Name(rawValue: "AccountRefreshDidBegin") + static let AccountRefreshDidFinish = Notification.Name(rawValue: "AccountRefreshDidFinish") + static let AccountRefreshProgressDidChange = Notification.Name(rawValue: "AccountRefreshProgressDidChange") + static let AccountDidDownloadArticles = Notification.Name(rawValue: "AccountDidDownloadArticles") - public static let StatusesDidChange = Notification.Name(rawValue: "StatusesDidChange") + static let StatusesDidChange = Notification.Name(rawValue: "StatusesDidChange") } public enum AccountType: Int { diff --git a/Frameworks/Account/DataExtensions.swift b/Frameworks/Account/DataExtensions.swift index 8d19eb1eb..304a1866b 100644 --- a/Frameworks/Account/DataExtensions.swift +++ b/Frameworks/Account/DataExtensions.swift @@ -12,12 +12,12 @@ import RSParser public extension Notification.Name { - public static let FeedSettingDidChange = Notification.Name(rawValue: "FeedSettingDidChangeNotification") + static let FeedSettingDidChange = Notification.Name(rawValue: "FeedSettingDidChangeNotification") } public extension Feed { - public func takeSettings(from parsedFeed: ParsedFeed) { + func takeSettings(from parsedFeed: ParsedFeed) { var didChangeAtLeastOneSetting = false @@ -52,11 +52,11 @@ public extension Feed { public extension Article { - public var account: Account? { + var account: Account? { return AccountManager.shared.existingAccount(with: accountID) } - public var feed: Feed? { + var feed: Feed? { return account?.existingFeed(with: feedID) } } diff --git a/Frameworks/Account/UnreadCountProvider.swift b/Frameworks/Account/UnreadCountProvider.swift index 10983a57e..282ec3c62 100644 --- a/Frameworks/Account/UnreadCountProvider.swift +++ b/Frameworks/Account/UnreadCountProvider.swift @@ -10,7 +10,7 @@ import Foundation public extension Notification.Name { - public static let UnreadCountDidChange = Notification.Name(rawValue: "UnreadCountDidChange") + static let UnreadCountDidChange = Notification.Name(rawValue: "UnreadCountDidChange") } public protocol UnreadCountProvider { @@ -24,12 +24,12 @@ public protocol UnreadCountProvider { public extension UnreadCountProvider { - public func postUnreadCountDidChangeNotification() { + func postUnreadCountDidChangeNotification() { NotificationCenter.default.post(name: .UnreadCountDidChange, object: self, userInfo: nil) } - public func calculateUnreadCount(_ children: T) -> Int { + func calculateUnreadCount(_ children: T) -> Int { let updatedUnreadCount = children.reduce(0) { (result, oneChild) -> Int in if let oneUnreadCountProvider = oneChild as? UnreadCountProvider { diff --git a/Frameworks/Articles/Article.swift b/Frameworks/Articles/Article.swift index 17f9da9c7..b7dce4d9a 100644 --- a/Frameworks/Articles/Article.swift +++ b/Frameworks/Articles/Article.swift @@ -68,11 +68,11 @@ public struct Article: Hashable { public extension Set where Element == Article { - public func articleIDs() -> Set { + func articleIDs() -> Set { return Set(map { $0.articleID }) } - public func unreadArticles() -> Set
{ + func unreadArticles() -> Set
{ let articles = self.filter { !$0.status.read } return Set(articles) } @@ -80,7 +80,7 @@ public extension Set where Element == Article { public extension Array where Element == Article { - public func articleIDs() -> [String] { + func articleIDs() -> [String] { return map { $0.articleID } } } diff --git a/Frameworks/Articles/ArticleStatus.swift b/Frameworks/Articles/ArticleStatus.swift index 60caa56ce..f4e7502e2 100644 --- a/Frameworks/Articles/ArticleStatus.swift +++ b/Frameworks/Articles/ArticleStatus.swift @@ -83,7 +83,7 @@ public final class ArticleStatus: Hashable { public extension Set where Element == ArticleStatus { - public func articleIDs() -> Set { + func articleIDs() -> Set { return Set(map { $0.articleID }) } @@ -91,7 +91,7 @@ public extension Set where Element == ArticleStatus { public extension Array where Element == ArticleStatus { - public func articleIDs() -> [String] { + func articleIDs() -> [String] { return map { $0.articleID } }