Create folders in Account module for each account type.
This commit is contained in:
parent
8de7b56f61
commit
a1c2a2b43a
@ -765,6 +765,22 @@ final class FeedlyAccountDelegate: AccountDelegate {
|
||||
try await updateAccountFeeds(parsedItems: parsedItems)
|
||||
}
|
||||
|
||||
@MainActor struct FeedlyFeedContainerValidator {
|
||||
var container: Container
|
||||
|
||||
func getValidContainer() throws -> (Folder, String) {
|
||||
guard let folder = container as? Folder else {
|
||||
throw FeedlyAccountDelegateError.addFeedChooseFolder
|
||||
}
|
||||
|
||||
guard let collectionID = folder.externalID else {
|
||||
throw FeedlyAccountDelegateError.addFeedInvalidFolder(folder.nameForDisplay)
|
||||
}
|
||||
|
||||
return (folder, collectionID)
|
||||
}
|
||||
}
|
||||
|
||||
func addNewFeed(url: String, feedName: String?, container: Container) async throws {
|
||||
|
||||
let validator = FeedlyFeedContainerValidator(container: container)
|
@ -1,26 +0,0 @@
|
||||
//
|
||||
// FeedlyFeedContainerValidator.swift
|
||||
// Account
|
||||
//
|
||||
// Created by Kiel Gillard on 10/10/19.
|
||||
// Copyright © 2019 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import Feedly
|
||||
|
||||
@MainActor struct FeedlyFeedContainerValidator {
|
||||
var container: Container
|
||||
|
||||
func getValidContainer() throws -> (Folder, String) {
|
||||
guard let folder = container as? Folder else {
|
||||
throw FeedlyAccountDelegateError.addFeedChooseFolder
|
||||
}
|
||||
|
||||
guard let collectionID = folder.externalID else {
|
||||
throw FeedlyAccountDelegateError.addFeedInvalidFolder(folder.nameForDisplay)
|
||||
}
|
||||
|
||||
return (folder, collectionID)
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user