From bce6806182f71168501a90e40ff433393e7ce923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kiel=20Gillard=20=F0=9F=A4=AA?= Date: Mon, 31 May 2021 09:12:39 +1000 Subject: [PATCH 1/3] Preserve custom feed names with Feedly when moving them between folders. Fixes #3109 --- .../Account/Feedly/FeedlyAccountDelegate.swift | 15 ++++++++------- .../FeedlyAddExistingFeedOperation.swift | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift b/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift index e2df06bf3..efa7436ae 100644 --- a/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift +++ b/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift @@ -382,13 +382,14 @@ final class FeedlyAccountDelegate: AccountDelegate { } let resource = FeedlyFeedResourceId(id: feed.webFeedID) - let addExistingFeed = try FeedlyAddExistingFeedOperation(account: account, - credentials: credentials, - resource: resource, - service: caller, - container: container, - progress: refreshProgress, - log: log) + let addExistingFeed = try FeedlyAddExistingFeedOperation(account: account, + credentials: credentials, + resource: resource, + service: caller, + container: container, + progress: refreshProgress, + log: log, + customFeedName: feed.editedName) addExistingFeed.addCompletionHandler = { result in diff --git a/Account/Sources/Account/Feedly/Operations/FeedlyAddExistingFeedOperation.swift b/Account/Sources/Account/Feedly/Operations/FeedlyAddExistingFeedOperation.swift index 07dc4c8ca..ed0824663 100644 --- a/Account/Sources/Account/Feedly/Operations/FeedlyAddExistingFeedOperation.swift +++ b/Account/Sources/Account/Feedly/Operations/FeedlyAddExistingFeedOperation.swift @@ -17,7 +17,7 @@ class FeedlyAddExistingFeedOperation: FeedlyOperation, FeedlyOperationDelegate, private let operationQueue = MainThreadOperationQueue() var addCompletionHandler: ((Result) -> ())? - 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 (folder, collectionId) = try validator.getValidContainer() @@ -28,7 +28,7 @@ class FeedlyAddExistingFeedOperation: FeedlyOperation, FeedlyOperationDelegate, 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.downloadProgress = progress self.operationQueue.add(addRequest) From 11c171fba12044061531e7daca5c7d66d15a1a95 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Tue, 8 Jun 2021 12:12:17 -0500 Subject: [PATCH 2/3] Update to latest RSCore and RSParser --- .../xcshareddata/swiftpm/Package.resolved | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/NetNewsWire.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/NetNewsWire.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index d98ef98fd..d1b0d534c 100644 --- a/NetNewsWire.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/NetNewsWire.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -42,8 +42,8 @@ "repositoryURL": "https://github.com/OAuthSwift/OAuthSwift.git", "state": { "branch": null, - "revision": "fde77955e6983fbfaabd491709d52b8a82fda4d0", - "version": "2.1.2" + "revision": "d85964b96dbce94df961f28b996187c835089903", + "version": "2.2.0" } }, { @@ -60,8 +60,8 @@ "repositoryURL": "https://github.com/Ranchero-Software/RSCore.git", "state": { "branch": null, - "revision": "665319af9428455e45c1d043156db85548b73f31", - "version": "1.0.5" + "revision": "2a13519b4d91843faa6aff4245b0e387dc64eafe", + "version": "1.0.6" } }, { @@ -78,8 +78,8 @@ "repositoryURL": "https://github.com/Ranchero-Software/RSParser.git", "state": { "branch": null, - "revision": "a4467cb6ab32d67fa8b09fcef8b234c7f96b7f9c", - "version": "2.0.0" + "revision": "7de3940c67a5fd128c8088eaa218617f2d3cc3ee", + "version": "2.0.2" } }, { From 630a89ba6dc134e3128c9554571204d207162e9a Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Thu, 17 Jun 2021 14:32:00 -0500 Subject: [PATCH 3/3] Fix the OAuthSwift package since the 2.2 version has trouble looking up credentials. --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- Secrets/Package.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NetNewsWire.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/NetNewsWire.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index d1b0d534c..b58a85312 100644 --- a/NetNewsWire.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/NetNewsWire.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -42,8 +42,8 @@ "repositoryURL": "https://github.com/OAuthSwift/OAuthSwift.git", "state": { "branch": null, - "revision": "d85964b96dbce94df961f28b996187c835089903", - "version": "2.2.0" + "revision": "fde77955e6983fbfaabd491709d52b8a82fda4d0", + "version": "2.1.2" } }, { diff --git a/Secrets/Package.swift b/Secrets/Package.swift index 2e30c6a8a..fdd6bc08a 100644 --- a/Secrets/Package.swift +++ b/Secrets/Package.swift @@ -11,7 +11,7 @@ let package = Package( targets: ["Secrets"]), ], dependencies: [ - .package(url: "https://github.com/OAuthSwift/OAuthSwift.git", .upToNextMajor(from: "2.1.2")), + .package(url: "https://github.com/OAuthSwift/OAuthSwift.git", .exact("2.1.2")), ], targets: [ .target(