Change function names using the find suffix to use the existing suffix to match precedent.
This commit is contained in:
parent
3b31f2562d
commit
2afdd26c9d
@ -516,7 +516,7 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container,
|
|||||||
return ensureFolder(with: folderName)
|
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 })
|
return folders?.first(where: { $0.nameForDisplay == displayName })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ public final class AccountManager: UnreadCountProvider {
|
|||||||
return lastArticleFetchEndTime
|
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 })
|
return AccountManager.shared.activeAccounts.first(where: { $0.nameForDisplay == displayName })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -476,7 +476,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
|
|||||||
|
|
||||||
if isReadFiltered ?? false {
|
if isReadFiltered ?? false {
|
||||||
if let accountName = userInfo[ArticlePathKey.accountName] as? String,
|
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)
|
exceptionArticleFetcher = SingleArticleFetcher(account: account, articleID: articleID)
|
||||||
fetchAndReplaceArticlesSync()
|
fetchAndReplaceArticlesSync()
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ struct AddWebFeedDefaultContainer {
|
|||||||
static var defaultContainer: Container? {
|
static var defaultContainer: Container? {
|
||||||
|
|
||||||
if let accountID = AppDefaults.addWebFeedAccountID, let account = AccountManager.shared.activeAccounts.first(where: { $0.accountID == accountID }) {
|
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
|
return folder
|
||||||
} else {
|
} else {
|
||||||
return substituteContainerIfNeeded(account: account)
|
return substituteContainerIfNeeded(account: account)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user