Rename addFolder to createFolder to be more consistent.

This commit is contained in:
Maurice Parker 2020-03-30 13:35:02 -05:00
parent f68d523a15
commit 53e947ee4c
9 changed files with 10 additions and 10 deletions

View File

@ -589,7 +589,7 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container,
}
public func addFolder(_ name: String, completion: @escaping (Result<Folder, Error>) -> Void) {
delegate.addFolder(for: self, name: name, completion: completion)
delegate.createFolder(for: self, name: name, completion: completion)
}
public func removeFolder(_ folder: Folder, completion: @escaping (Result<Void, Error>) -> Void) {

View File

@ -30,7 +30,7 @@ protocol AccountDelegate {
func importOPML(for account:Account, opmlFile: URL, completion: @escaping (Result<Void, Error>) -> Void)
func addFolder(for account: Account, name: String, completion: @escaping (Result<Folder, Error>) -> Void)
func createFolder(for account: Account, name: String, completion: @escaping (Result<Folder, Error>) -> Void)
func renameFolder(for account: Account, with folder: Folder, to name: String, completion: @escaping (Result<Void, Error>) -> Void)
func removeFolder(for account: Account, with folder: Folder, completion: @escaping (Result<Void, Error>) -> Void)

View File

@ -234,7 +234,7 @@ final class CloudKitAccountDelegate: AccountDelegate {
completion(.success(()))
}
func addFolder(for account: Account, name: String, completion: @escaping (Result<Folder, Error>) -> Void) {
func createFolder(for account: Account, name: String, completion: @escaping (Result<Folder, Error>) -> Void) {
if let folder = account.ensureFolder(with: name) {
completion(.success(folder))
} else {

View File

@ -283,7 +283,7 @@ final class FeedWranglerAccountDelegate: AccountDelegate {
fatalError()
}
func addFolder(for account: Account, name: String, completion: @escaping (Result<Folder, Error>) -> Void) {
func createFolder(for account: Account, name: String, completion: @escaping (Result<Folder, Error>) -> Void) {
fatalError()
}

View File

@ -269,7 +269,7 @@ final class FeedbinAccountDelegate: AccountDelegate {
}
func addFolder(for account: Account, name: String, completion: @escaping (Result<Folder, Error>) -> Void) {
func createFolder(for account: Account, name: String, completion: @escaping (Result<Folder, Error>) -> Void) {
if let folder = account.ensureFolder(with: name) {
completion(.success(folder))
} else {

View File

@ -216,7 +216,7 @@ final class FeedlyAccountDelegate: AccountDelegate {
}
}
func addFolder(for account: Account, name: String, completion: @escaping (Result<Folder, Error>) -> Void) {
func createFolder(for account: Account, name: String, completion: @escaping (Result<Folder, Error>) -> Void) {
let progress = refreshProgress
progress.addToNumberOfTasksAndRemaining(1)

View File

@ -167,7 +167,7 @@ final class LocalAccountDelegate: AccountDelegate {
completion(.success(()))
}
func addFolder(for account: Account, name: String, completion: @escaping (Result<Folder, Error>) -> Void) {
func createFolder(for account: Account, name: String, completion: @escaping (Result<Folder, Error>) -> Void) {
if let folder = account.ensureFolder(with: name) {
completion(.success(folder))
} else {

View File

@ -339,7 +339,7 @@ final class NewsBlurAccountDelegate: AccountDelegate {
completion(.success(()))
}
func addFolder(for account: Account, name: String, completion: @escaping (Result<Folder, Error>) -> ()) {
func createFolder(for account: Account, name: String, completion: @escaping (Result<Folder, Error>) -> ()) {
self.refreshProgress.addToNumberOfTasksAndRemaining(1)
caller.addFolder(named: name) { result in
@ -546,7 +546,7 @@ final class NewsBlurAccountDelegate: AccountDelegate {
let group = DispatchGroup()
group.enter()
addFolder(for: account, name: folderName) { result in
createFolder(for: account, name: folderName) { result in
group.leave()
switch result {
case .success(let folder):

View File

@ -206,7 +206,7 @@ final class ReaderAPIAccountDelegate: AccountDelegate {
func importOPML(for account:Account, opmlFile: URL, completion: @escaping (Result<Void, Error>) -> Void) {
}
func addFolder(for account: Account, name: String, completion: @escaping (Result<Folder, Error>) -> Void) {
func createFolder(for account: Account, name: String, completion: @escaping (Result<Folder, Error>) -> Void) {
if let folder = account.ensureFolder(with: name) {
completion(.success(folder))
} else {