Change function names using the find suffix to use the existing suffix to match precedent.

This commit is contained in:
Maurice Parker 2020-03-29 12:00:02 -05:00
parent 3b31f2562d
commit 2afdd26c9d
4 changed files with 4 additions and 4 deletions

View File

@ -516,7 +516,7 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container,
return ensureFolder(with: folderName)
}
public func findFolder(withDisplayName displayName: String) -> Folder? {
public func existingFolder(withDisplayName displayName: String) -> Folder? {
return folders?.first(where: { $0.nameForDisplay == displayName })
}

View File

@ -72,7 +72,7 @@ public final class AccountManager: UnreadCountProvider {
return lastArticleFetchEndTime
}
public func findActiveAccount(forDisplayName displayName: String) -> Account? {
public func existingActiveAccount(forDisplayName displayName: String) -> Account? {
return AccountManager.shared.activeAccounts.first(where: { $0.nameForDisplay == displayName })
}

View File

@ -476,7 +476,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
if isReadFiltered ?? false {
if let accountName = userInfo[ArticlePathKey.accountName] as? String,
let account = AccountManager.shared.findActiveAccount(forDisplayName: accountName) {
let account = AccountManager.shared.existingActiveAccount(forDisplayName: accountName) {
exceptionArticleFetcher = SingleArticleFetcher(account: account, articleID: articleID)
fetchAndReplaceArticlesSync()
}

View File

@ -14,7 +14,7 @@ struct AddWebFeedDefaultContainer {
static var defaultContainer: Container? {
if let accountID = AppDefaults.addWebFeedAccountID, let account = AccountManager.shared.activeAccounts.first(where: { $0.accountID == accountID }) {
if let folderName = AppDefaults.addWebFeedFolderName, let folder = account.findFolder(withDisplayName: folderName) {
if let folderName = AppDefaults.addWebFeedFolderName, let folder = account.existingFolder(withDisplayName: folderName) {
return folder
} else {
return substituteContainerIfNeeded(account: account)