Merge pull request #3139 from kielgillard/ios-candidate
Preserve custom feed names with Feedly when moving them between folde…
This commit is contained in:
commit
0692d0b79f
|
@ -382,13 +382,14 @@ final class FeedlyAccountDelegate: AccountDelegate {
|
||||||
}
|
}
|
||||||
|
|
||||||
let resource = FeedlyFeedResourceId(id: feed.webFeedID)
|
let resource = FeedlyFeedResourceId(id: feed.webFeedID)
|
||||||
let addExistingFeed = try FeedlyAddExistingFeedOperation(account: account,
|
let addExistingFeed = try FeedlyAddExistingFeedOperation(account: account,
|
||||||
credentials: credentials,
|
credentials: credentials,
|
||||||
resource: resource,
|
resource: resource,
|
||||||
service: caller,
|
service: caller,
|
||||||
container: container,
|
container: container,
|
||||||
progress: refreshProgress,
|
progress: refreshProgress,
|
||||||
log: log)
|
log: log,
|
||||||
|
customFeedName: feed.editedName)
|
||||||
|
|
||||||
|
|
||||||
addExistingFeed.addCompletionHandler = { result in
|
addExistingFeed.addCompletionHandler = { result in
|
||||||
|
|
|
@ -17,7 +17,7 @@ class FeedlyAddExistingFeedOperation: FeedlyOperation, FeedlyOperationDelegate,
|
||||||
private let operationQueue = MainThreadOperationQueue()
|
private let operationQueue = MainThreadOperationQueue()
|
||||||
var addCompletionHandler: ((Result<Void, Error>) -> ())?
|
var addCompletionHandler: ((Result<Void, Error>) -> ())?
|
||||||
|
|
||||||
init(account: Account, credentials: Credentials, resource: FeedlyFeedResourceId, service: FeedlyAddFeedToCollectionService, container: Container, progress: DownloadProgress, log: OSLog) throws {
|
init(account: Account, credentials: Credentials, resource: FeedlyFeedResourceId, service: FeedlyAddFeedToCollectionService, container: Container, progress: DownloadProgress, log: OSLog, customFeedName: String? = nil) throws {
|
||||||
|
|
||||||
let validator = FeedlyFeedContainerValidator(container: container)
|
let validator = FeedlyFeedContainerValidator(container: container)
|
||||||
let (folder, collectionId) = try validator.getValidContainer()
|
let (folder, collectionId) = try validator.getValidContainer()
|
||||||
|
@ -28,7 +28,7 @@ class FeedlyAddExistingFeedOperation: FeedlyOperation, FeedlyOperationDelegate,
|
||||||
|
|
||||||
self.downloadProgress = progress
|
self.downloadProgress = progress
|
||||||
|
|
||||||
let addRequest = FeedlyAddFeedToCollectionOperation(account: account, folder: folder, feedResource: resource, feedName: nil, collectionId: collectionId, service: service)
|
let addRequest = FeedlyAddFeedToCollectionOperation(account: account, folder: folder, feedResource: resource, feedName: customFeedName, collectionId: collectionId, service: service)
|
||||||
addRequest.delegate = self
|
addRequest.delegate = self
|
||||||
addRequest.downloadProgress = progress
|
addRequest.downloadProgress = progress
|
||||||
self.operationQueue.add(addRequest)
|
self.operationQueue.add(addRequest)
|
||||||
|
|
Loading…
Reference in New Issue