From 4898a753b595ed385a98ccf294906018fced0ffa Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Thu, 15 Apr 2021 17:36:09 -0700 Subject: [PATCH 01/21] Bump version to 6.0.2b1. --- xcconfig/common/NetNewsWire_mac_target_common.xcconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xcconfig/common/NetNewsWire_mac_target_common.xcconfig b/xcconfig/common/NetNewsWire_mac_target_common.xcconfig index eb5f690ce..418682b9e 100644 --- a/xcconfig/common/NetNewsWire_mac_target_common.xcconfig +++ b/xcconfig/common/NetNewsWire_mac_target_common.xcconfig @@ -1,6 +1,6 @@ // High Level Settings common to both the Mac application and any extensions we bundle with it -MARKETING_VERSION = 6.0.1 -CURRENT_PROJECT_VERSION = 6030 +MARKETING_VERSION = 6.0.2b1 +CURRENT_PROJECT_VERSION = 6031 ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; From 384daa4dbd37406fc396863d420ef876092632b8 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Thu, 15 Apr 2021 17:49:23 -0700 Subject: [PATCH 02/21] Update release notes. --- Technotes/ReleaseNotes-Mac.markdown | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Technotes/ReleaseNotes-Mac.markdown b/Technotes/ReleaseNotes-Mac.markdown index c3abcbf58..e73a6c0fd 100644 --- a/Technotes/ReleaseNotes-Mac.markdown +++ b/Technotes/ReleaseNotes-Mac.markdown @@ -1,5 +1,10 @@ # Mac Release Notes +### 6.0.2b1 build 6031 - 15 April 2021 + +Inoreader sync: fixed (hopefully) cause of rate limit errors — now doing background sync of statuses much less often - note that this fix needs to be rolled out across all NetNewsWire users in order for it to have full effect +Fixed regression with the L key — now works properly again + ### 6.0.1 build 6030 - 1 Apr 2021 Adjusted layout of the add account sheet so that it fits on smaller monitors From 3c2e2c15786561a188dd1341a553d8d19048c299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kiel=20Gillard=20=F0=9F=A4=AA?= Date: Sun, 18 Apr 2021 20:10:01 +1000 Subject: [PATCH 03/21] Feedly API is no longer returning the collection/folder values for deleted collections/folders so make the response (which we ignore anyway), optional. Fixes #3015 --- Account/Sources/Account/Feedly/FeedlyAPICaller.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Account/Sources/Account/Feedly/FeedlyAPICaller.swift b/Account/Sources/Account/Feedly/FeedlyAPICaller.swift index f855a95e0..4ee2be353 100644 --- a/Account/Sources/Account/Feedly/FeedlyAPICaller.swift +++ b/Account/Sources/Account/Feedly/FeedlyAPICaller.swift @@ -310,7 +310,7 @@ final class FeedlyAPICaller { request.addValue("application/json", forHTTPHeaderField: "Accept-Type") request.addValue("OAuth \(accessToken)", forHTTPHeaderField: HTTPRequestHeader.authorization) - send(request: request, resultType: String.self, dateDecoding: .millisecondsSince1970, keyDecoding: .convertFromSnakeCase) { result in + send(request: request, resultType: Optional.self, dateDecoding: .millisecondsSince1970, keyDecoding: .convertFromSnakeCase) { result in switch result { case .success(let (httpResponse, _)): if httpResponse.statusCode == 200 { From 66b61cea84fc1cdaa449524e197f6059005b8fb4 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Tue, 20 Apr 2021 17:12:18 -0700 Subject: [PATCH 04/21] Update version and change notes for 6.0.2. --- Technotes/ReleaseNotes-Mac.markdown | 4 ++++ xcconfig/common/NetNewsWire_mac_target_common.xcconfig | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Technotes/ReleaseNotes-Mac.markdown b/Technotes/ReleaseNotes-Mac.markdown index e73a6c0fd..1d914f1e3 100644 --- a/Technotes/ReleaseNotes-Mac.markdown +++ b/Technotes/ReleaseNotes-Mac.markdown @@ -1,5 +1,9 @@ # Mac Release Notes +### 6.0.2 build 6.32 - 20 April 2021 + +Same as 6.0.2b1 + ### 6.0.2b1 build 6031 - 15 April 2021 Inoreader sync: fixed (hopefully) cause of rate limit errors — now doing background sync of statuses much less often - note that this fix needs to be rolled out across all NetNewsWire users in order for it to have full effect diff --git a/xcconfig/common/NetNewsWire_mac_target_common.xcconfig b/xcconfig/common/NetNewsWire_mac_target_common.xcconfig index 418682b9e..3936bba05 100644 --- a/xcconfig/common/NetNewsWire_mac_target_common.xcconfig +++ b/xcconfig/common/NetNewsWire_mac_target_common.xcconfig @@ -1,6 +1,6 @@ // High Level Settings common to both the Mac application and any extensions we bundle with it -MARKETING_VERSION = 6.0.2b1 -CURRENT_PROJECT_VERSION = 6031 +MARKETING_VERSION = 6.0.2 +CURRENT_PROJECT_VERSION = 6032 ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; From 7afd2e1e2183bc2d57def77d881bf2e4345cca54 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Sat, 24 Apr 2021 15:52:38 +0800 Subject: [PATCH 05/21] Fixes #3056 on Mac --- Account/Sources/Account/NewsBlur/NewsBlurAPICaller.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Account/Sources/Account/NewsBlur/NewsBlurAPICaller.swift b/Account/Sources/Account/NewsBlur/NewsBlurAPICaller.swift index 02935e1d9..58849c6cd 100644 --- a/Account/Sources/Account/NewsBlur/NewsBlurAPICaller.swift +++ b/Account/Sources/Account/NewsBlur/NewsBlurAPICaller.swift @@ -133,7 +133,7 @@ final class NewsBlurAPICaller: NSObject { URLQueryItem(name: "page", value: String(page)), URLQueryItem(name: "order", value: "newest"), URLQueryItem(name: "read_filter", value: "all"), - URLQueryItem(name: "include_hidden", value: "true"), + URLQueryItem(name: "include_hidden", value: "false"), URLQueryItem(name: "include_story_content", value: "true"), ]) @@ -150,7 +150,7 @@ final class NewsBlurAPICaller: NSObject { func retrieveStories(hashes: [NewsBlurStoryHash], completion: @escaping (Result<([NewsBlurStory]?, Date?), Error>) -> Void) { let url = baseURL .appendingPathComponent("reader/river_stories") - .appendingQueryItem(.init(name: "include_hidden", value: "true"))? + .appendingQueryItem(.init(name: "include_hidden", value: "false"))? .appendingQueryItems(hashes.map { URLQueryItem(name: "h", value: $0.hash) }) From 858672fdaf6a9111ea8c2bb818953ced6738cd48 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Sun, 25 Apr 2021 13:31:15 +0800 Subject: [PATCH 06/21] fix on release branch --- Mac/Preferences/Accounts/AccountsReaderAPIWindowController.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Mac/Preferences/Accounts/AccountsReaderAPIWindowController.swift b/Mac/Preferences/Accounts/AccountsReaderAPIWindowController.swift index 85e79cb7e..9dfac12c4 100644 --- a/Mac/Preferences/Accounts/AccountsReaderAPIWindowController.swift +++ b/Mac/Preferences/Accounts/AccountsReaderAPIWindowController.swift @@ -43,6 +43,7 @@ class AccountsReaderAPIWindowController: NSWindowController { titleLabel.stringValue = NSLocalizedString("Sign in to your FreshRSS account.", comment: "FreshRSS") noAccountTextField.stringValue = NSLocalizedString("Don't have a FreshRSS instance?", comment: "No FreshRSS") createAccountButton.title = NSLocalizedString("Find out more", comment: "No FreshRSS Button") + apiURLTextField.placeholderString = NSLocalizedString("fresh.rss.net/api/greader.php", comment: "FreshRSS API Helper") case .inoreader: titleImageView.image = AppAssets.accountInoreader titleLabel.stringValue = NSLocalizedString("Sign in to your InoReader account.", comment: "InoReader") From a4d9f018f64e68a0f378593a3a6edb206ae8dbd0 Mon Sep 17 00:00:00 2001 From: Duncan Babbage Date: Tue, 27 Apr 2021 12:23:51 +1200 Subject: [PATCH 07/21] Always show Smart Feeds. Fixes #3052 Display Smart Feeds always, even when read articles are being hidden and all articles from a feed have been marked as read, and even when there are no items in a Smart Feed. --- Shared/Tree/WebFeedTreeControllerDelegate.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Shared/Tree/WebFeedTreeControllerDelegate.swift b/Shared/Tree/WebFeedTreeControllerDelegate.swift index cd1da83ef..60eceef26 100644 --- a/Shared/Tree/WebFeedTreeControllerDelegate.swift +++ b/Shared/Tree/WebFeedTreeControllerDelegate.swift @@ -56,9 +56,7 @@ private extension WebFeedTreeControllerDelegate { func childNodesForSmartFeeds(_ parentNode: Node) -> [Node] { return SmartFeedsController.shared.smartFeeds.compactMap { (feed) -> Node? in - if let feedID = feed.feedID, !filterExceptions.contains(feedID) && isReadFiltered && feed.unreadCount == 0 { - return nil - } + // All Smart Feeds should remain visible despite the Hide Read Feeds setting return parentNode.existingOrNewChildNode(with: feed as AnyObject) } } From 73bbb67d643e579e5c1e593427e0726f48fd5a15 Mon Sep 17 00:00:00 2001 From: Duncan Babbage Date: Wed, 28 Apr 2021 13:29:48 +1200 Subject: [PATCH 08/21] Handle footnote backlinks w/o css classes. Fixes #3084 --- Shared/Article Rendering/newsfoot.js | 2 +- Shared/Article Rendering/shared.css | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Shared/Article Rendering/newsfoot.js b/Shared/Article Rendering/newsfoot.js index 1a53dbe42..38d3b9e10 100644 --- a/Shared/Article Rendering/newsfoot.js +++ b/Shared/Article Rendering/newsfoot.js @@ -157,7 +157,7 @@ document.addEventListener("click", (ev) => { if (!(ev.target && ev.target instanceof HTMLAnchorElement)) return; - if (!ev.target.matches(".footnotes .reversefootnote, .footnotes .footnoteBackLink, .footnotes .footnote-return")) return; + if (!ev.target.matches(".footnotes .reversefootnote, .footnotes .footnoteBackLink, .footnotes .footnote-return, .footnotes a[href^='#']")) return; const id = idFromHash(ev.target); if (!id) return; const fnref = document.getElementById(id); diff --git a/Shared/Article Rendering/shared.css b/Shared/Article Rendering/shared.css index 9989734c4..fa1c91eb5 100644 --- a/Shared/Article Rendering/shared.css +++ b/Shared/Article Rendering/shared.css @@ -375,7 +375,8 @@ img[src*="share-buttons"] { .newsfoot-footnote-popover .reversefootnote, .newsfoot-footnote-popover .footnoteBackLink, -.newsfoot-footnote-popover .footnote-return { +.newsfoot-footnote-popover .footnote-return, +.newsfoot-footnote-popover a[href^='#fn'] { display: none; } From 00f1bdce97f86b2d89f25187efa576bd85b95fc5 Mon Sep 17 00:00:00 2001 From: Duncan Babbage Date: Thu, 29 Apr 2021 19:57:08 +1200 Subject: [PATCH 09/21] Capture fully resolved footnote backlinks. Extends #3084 --- Shared/Article Rendering/newsfoot.js | 2 +- Shared/Article Rendering/shared.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Shared/Article Rendering/newsfoot.js b/Shared/Article Rendering/newsfoot.js index 38d3b9e10..aba1bc8ec 100644 --- a/Shared/Article Rendering/newsfoot.js +++ b/Shared/Article Rendering/newsfoot.js @@ -157,7 +157,7 @@ document.addEventListener("click", (ev) => { if (!(ev.target && ev.target instanceof HTMLAnchorElement)) return; - if (!ev.target.matches(".footnotes .reversefootnote, .footnotes .footnoteBackLink, .footnotes .footnote-return, .footnotes a[href^='#']")) return; + if (!ev.target.matches(".footnotes .reversefootnote, .footnotes .footnoteBackLink, .footnotes .footnote-return, .footnotes a[href*='#fn'], .footnotes a[href^='#']")) return; const id = idFromHash(ev.target); if (!id) return; const fnref = document.getElementById(id); diff --git a/Shared/Article Rendering/shared.css b/Shared/Article Rendering/shared.css index fa1c91eb5..9019d6aee 100644 --- a/Shared/Article Rendering/shared.css +++ b/Shared/Article Rendering/shared.css @@ -376,7 +376,7 @@ img[src*="share-buttons"] { .newsfoot-footnote-popover .reversefootnote, .newsfoot-footnote-popover .footnoteBackLink, .newsfoot-footnote-popover .footnote-return, -.newsfoot-footnote-popover a[href^='#fn'] { +.newsfoot-footnote-popover a[href*='#fn'] { display: none; } From 83332d135842160e2cc218f3635e590107d8d894 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Wed, 5 May 2021 21:24:27 -0500 Subject: [PATCH 10/21] Retain existing feeds for folders that haven't been created yet. Fixes #3047 --- .../CloudKitAccountZoneDelegate.swift | 52 +++++++++++++------ 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/Account/Sources/Account/CloudKit/CloudKitAccountZoneDelegate.swift b/Account/Sources/Account/CloudKit/CloudKitAccountZoneDelegate.swift index 73d347ec0..8ff7fbe3f 100644 --- a/Account/Sources/Account/CloudKit/CloudKitAccountZoneDelegate.swift +++ b/Account/Sources/Account/CloudKit/CloudKitAccountZoneDelegate.swift @@ -16,8 +16,9 @@ import Articles class CloudKitAcountZoneDelegate: CloudKitZoneDelegate { private typealias UnclaimedWebFeed = (url: URL, name: String?, editedName: String?, homePageURL: String?, webFeedExternalID: String) - private var unclaimedWebFeeds = [String: [UnclaimedWebFeed]]() - + private var newUnclaimedWebFeeds = [String: [UnclaimedWebFeed]]() + private var existingUnclaimedWebFeeds = [String: [WebFeed]]() + private var log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "CloudKit") weak var account: Account? @@ -75,7 +76,7 @@ class CloudKitAcountZoneDelegate: CloudKitZoneDelegate { if let container = account.existingContainer(withExternalID: containerExternalID) { createWebFeedIfNecessary(url: url, name: name, editedName: editedName, homePageURL: homePageURL, webFeedExternalID: record.externalID, container: container) } else { - addUnclaimedWebFeed(url: url, name: name, editedName: editedName, homePageURL: homePageURL, webFeedExternalID: record.externalID, containerExternalID: containerExternalID) + addNewUnclaimedWebFeed(url: url, name: name, editedName: editedName, homePageURL: homePageURL, webFeedExternalID: record.externalID, containerExternalID: containerExternalID) } } } @@ -106,19 +107,27 @@ class CloudKitAcountZoneDelegate: CloudKitZoneDelegate { folder?.externalID = record.externalID } - if let folder = folder, let containerExternalID = folder.externalID, let unclaimedWebFeeds = unclaimedWebFeeds[containerExternalID] { - for unclaimedWebFeed in unclaimedWebFeeds { - createWebFeedIfNecessary(url: unclaimedWebFeed.url, - name: unclaimedWebFeed.name, - editedName: unclaimedWebFeed.editedName, - homePageURL: unclaimedWebFeed.homePageURL, - webFeedExternalID: unclaimedWebFeed.webFeedExternalID, + guard let folder = folder, let containerExternalID = folder.externalID else { return } + + if let newUnclaimedWebFeeds = newUnclaimedWebFeeds[containerExternalID] { + for newUnclaimedWebFeed in newUnclaimedWebFeeds { + createWebFeedIfNecessary(url: newUnclaimedWebFeed.url, + name: newUnclaimedWebFeed.name, + editedName: newUnclaimedWebFeed.editedName, + homePageURL: newUnclaimedWebFeed.homePageURL, + webFeedExternalID: newUnclaimedWebFeed.webFeedExternalID, container: folder) } - self.unclaimedWebFeeds.removeValue(forKey: containerExternalID) + self.newUnclaimedWebFeeds.removeValue(forKey: containerExternalID) } + if let existingUnclaimedWebFeeds = existingUnclaimedWebFeeds[containerExternalID] { + for existingUnclaimedWebFeed in existingUnclaimedWebFeeds { + folder.addWebFeed(existingUnclaimedWebFeed) + } + self.existingUnclaimedWebFeeds.removeValue(forKey: containerExternalID) + } } func removeContainer(_ externalID: String) { @@ -152,6 +161,8 @@ private extension CloudKitAcountZoneDelegate { case .insert(_, let externalID, _): if let container = account.existingContainer(withExternalID: externalID) { container.addWebFeed(webFeed) + } else { + addExistingUnclaimedWebFeed(webFeed, containerExternalID: externalID) } } } @@ -170,14 +181,25 @@ private extension CloudKitAcountZoneDelegate { container.addWebFeed(webFeed) } - func addUnclaimedWebFeed(url: URL, name: String?, editedName: String?, homePageURL: String?, webFeedExternalID: String, containerExternalID: String) { - if var unclaimedWebFeeds = self.unclaimedWebFeeds[containerExternalID] { + func addNewUnclaimedWebFeed(url: URL, name: String?, editedName: String?, homePageURL: String?, webFeedExternalID: String, containerExternalID: String) { + if var unclaimedWebFeeds = self.newUnclaimedWebFeeds[containerExternalID] { unclaimedWebFeeds.append(UnclaimedWebFeed(url: url, name: name, editedName: editedName, homePageURL: homePageURL, webFeedExternalID: webFeedExternalID)) - self.unclaimedWebFeeds[containerExternalID] = unclaimedWebFeeds + self.newUnclaimedWebFeeds[containerExternalID] = unclaimedWebFeeds } else { var unclaimedWebFeeds = [UnclaimedWebFeed]() unclaimedWebFeeds.append(UnclaimedWebFeed(url: url, name: name, editedName: editedName, homePageURL: homePageURL, webFeedExternalID: webFeedExternalID)) - self.unclaimedWebFeeds[containerExternalID] = unclaimedWebFeeds + self.newUnclaimedWebFeeds[containerExternalID] = unclaimedWebFeeds + } + } + + func addExistingUnclaimedWebFeed(_ webFeed: WebFeed, containerExternalID: String) { + if var unclaimedWebFeeds = self.existingUnclaimedWebFeeds[containerExternalID] { + unclaimedWebFeeds.append(webFeed) + self.existingUnclaimedWebFeeds[containerExternalID] = unclaimedWebFeeds + } else { + var unclaimedWebFeeds = [WebFeed]() + unclaimedWebFeeds.append(webFeed) + self.existingUnclaimedWebFeeds[containerExternalID] = unclaimedWebFeeds } } From 056b17703aa8cd9c9aa45f82ec7cd0b702106ca1 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Thu, 6 May 2021 06:36:11 -0500 Subject: [PATCH 11/21] Move deep signing flag to xcconfig files --- xcconfig/NetNewsWire_macapp_target.xcconfig | 1 + xcconfig/NetNewsWire_shareextension_target.xcconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/xcconfig/NetNewsWire_macapp_target.xcconfig b/xcconfig/NetNewsWire_macapp_target.xcconfig index 95bf74635..fe68dad83 100644 --- a/xcconfig/NetNewsWire_macapp_target.xcconfig +++ b/xcconfig/NetNewsWire_macapp_target.xcconfig @@ -38,3 +38,4 @@ DEVELOPER_ENTITLEMENTS = CODE_SIGN_ENTITLEMENTS = Mac/Resources/NetNewsWire$(DEVELOPER_ENTITLEMENTS).entitlements PRODUCT_BUNDLE_IDENTIFIER = $(ORGANIZATION_IDENTIFIER).NetNewsWire-Evergreen +OTHER_CODE_SIGN_FLAGS = --deep diff --git a/xcconfig/NetNewsWire_shareextension_target.xcconfig b/xcconfig/NetNewsWire_shareextension_target.xcconfig index fa2973248..96984d761 100644 --- a/xcconfig/NetNewsWire_shareextension_target.xcconfig +++ b/xcconfig/NetNewsWire_shareextension_target.xcconfig @@ -42,3 +42,4 @@ PRODUCT_NAME = $(TARGET_NAME) ASSETCATALOG_COMPILER_APPICON_NAME = SDKROOT = macosx +OTHER_CODE_SIGN_FLAGS = --deep From 92287d9bd5992a05071b211748a38bad5ddd9d64 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Thu, 6 May 2021 13:52:50 -0500 Subject: [PATCH 12/21] Initialize the author as nil if it is unparsable. Fixes #3034 --- .../Sources/Account/Feedbin/FeedbinEntry.swift | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Account/Sources/Account/Feedbin/FeedbinEntry.swift b/Account/Sources/Account/Feedbin/FeedbinEntry.swift index 82b40e186..741d6abfc 100644 --- a/Account/Sources/Account/Feedbin/FeedbinEntry.swift +++ b/Account/Sources/Account/Feedbin/FeedbinEntry.swift @@ -10,7 +10,7 @@ import Foundation import RSParser import RSCore -final class FeedbinEntry: Codable { +final class FeedbinEntry: Decodable { let articleID: Int let feedID: Int @@ -50,14 +50,25 @@ final class FeedbinEntry: Codable { } } -struct FeedbinEntryJSONFeed: Codable { +struct FeedbinEntryJSONFeed: Decodable { let jsonFeedAuthor: FeedbinEntryJSONFeedAuthor? + enum CodingKeys: String, CodingKey { case jsonFeedAuthor = "author" } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + do { + jsonFeedAuthor = try container.decode(FeedbinEntryJSONFeedAuthor.self, forKey: .jsonFeedAuthor) + } catch { + jsonFeedAuthor = nil + } + } + } -struct FeedbinEntryJSONFeedAuthor: Codable { +struct FeedbinEntryJSONFeedAuthor: Decodable { let url: String? let avatarURL: String? enum CodingKeys: String, CodingKey { From 5a31a90d0ccbe245c41e4f83628b74685e4bbc13 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Wed, 12 May 2021 19:53:34 -0500 Subject: [PATCH 13/21] If we can't find a feed, it must be deleted by another device, so consider it a success. Fixes #3042 --- Account/Sources/Account/CloudKit/CloudKitAccountZone.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Account/Sources/Account/CloudKit/CloudKitAccountZone.swift b/Account/Sources/Account/CloudKit/CloudKitAccountZone.swift index fa58df337..e5f971c55 100644 --- a/Account/Sources/Account/CloudKit/CloudKitAccountZone.swift +++ b/Account/Sources/Account/CloudKit/CloudKitAccountZone.swift @@ -180,7 +180,11 @@ final class CloudKitAccountZone: CloudKitZone { } case .failure(let error): - completion(.failure(error)) + if let ckError = ((error as? CloudKitError)?.error as? CKError), ckError.code == .unknownItem { + completion(.success(true)) + } else { + completion(.failure(error)) + } } } } From 7b3921bcb1ec1e85e1eafe065072f93d0e0884b6 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Wed, 12 May 2021 20:06:46 -0500 Subject: [PATCH 14/21] Call completion if even it if we don't initialize the command. Fixes #3092 --- Shared/Commands/MarkStatusCommand.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Shared/Commands/MarkStatusCommand.swift b/Shared/Commands/MarkStatusCommand.swift index e6eae4b54..79cf9777c 100644 --- a/Shared/Commands/MarkStatusCommand.swift +++ b/Shared/Commands/MarkStatusCommand.swift @@ -27,6 +27,7 @@ final class MarkStatusCommand: UndoableCommand { // Filter out articles that already have the desired status or can't be marked. let articlesToMark = MarkStatusCommand.filteredArticles(initialArticles, statusKey, flag) if articlesToMark.isEmpty { + completion?() return nil } self.articles = Set(articlesToMark) From 629d74b67b7fb79c270037feea3f046c6772ddcd Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Thu, 13 May 2021 20:54:33 -0500 Subject: [PATCH 15/21] Improve the FreshRSS error message when the API URL isn't found. Fixes #3061 --- .../ReaderAPI/ReaderAPIAccountDelegate.swift | 22 +++++++++++++++---- .../Account/ReaderAPI/ReaderAPICaller.swift | 6 ++++- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/Account/Sources/Account/ReaderAPI/ReaderAPIAccountDelegate.swift b/Account/Sources/Account/ReaderAPI/ReaderAPIAccountDelegate.swift index 84d8b7353..16d333340 100644 --- a/Account/Sources/Account/ReaderAPI/ReaderAPIAccountDelegate.swift +++ b/Account/Sources/Account/ReaderAPI/ReaderAPIAccountDelegate.swift @@ -14,10 +14,24 @@ import SyncDatabase import os.log import Secrets -public enum ReaderAPIAccountDelegateError: String, Error { - case unknown = "An unknown error occurred." - case invalidParameter = "There was an invalid parameter passed." - case invalidResponse = "There was an invalid response from the server." +public enum ReaderAPIAccountDelegateError: LocalizedError { + case unknown + case invalidParameter + case invalidResponse + case urlNotFound + + public var errorDescription: String? { + switch self { + case .unknown: + return NSLocalizedString("An unexpected error occurred.", comment: "An unexpected error occurred.") + case .invalidParameter: + return NSLocalizedString("An invalid parameter was passed.", comment: "An invalid parameter was passed.") + case .invalidResponse: + return NSLocalizedString("There was an invalid response from the server.", comment: "There was an invalid response from the server.") + case .urlNotFound: + return NSLocalizedString("The API URL wasn't found.", comment: "The API URL wasn't found.") + } + } } final class ReaderAPIAccountDelegate: AccountDelegate { diff --git a/Account/Sources/Account/ReaderAPI/ReaderAPICaller.swift b/Account/Sources/Account/ReaderAPI/ReaderAPICaller.swift index 4e9f1b0c1..805fd3b8d 100644 --- a/Account/Sources/Account/ReaderAPI/ReaderAPICaller.swift +++ b/Account/Sources/Account/ReaderAPI/ReaderAPICaller.swift @@ -132,7 +132,11 @@ final class ReaderAPICaller: NSObject { completion(.success(self.credentials)) case .failure(let error): - completion(.failure(error)) + if let transportError = error as? TransportError, case .httpError(let code) = transportError, code == 404 { + completion(.failure(ReaderAPIAccountDelegateError.urlNotFound)) + } else { + completion(.failure(error)) + } } } From 3dbfc9a3b7cc355c5bd2b25d92af82a3afae51ff Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Mon, 17 May 2021 14:06:55 -0500 Subject: [PATCH 16/21] Change to test all characters for multiple scalars. Fixes #3120 --- .../FeedProvider/Twitter/TwitterStatus.swift | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Account/Sources/Account/FeedProvider/Twitter/TwitterStatus.swift b/Account/Sources/Account/FeedProvider/Twitter/TwitterStatus.swift index 59f3dfc58..149814667 100644 --- a/Account/Sources/Account/FeedProvider/Twitter/TwitterStatus.swift +++ b/Account/Sources/Account/FeedProvider/Twitter/TwitterStatus.swift @@ -78,21 +78,21 @@ private extension TwitterStatus { var html = String() var prevIndex = displayStartIndex - var emojiOffset = 0 + var unicodeScalarOffset = 0 for entity in entities { - // The twitter indices are messed up by emoji with more than one scalar, we are going to adjust for that here. - let emojiEndIndex = text.index(text.startIndex, offsetBy: entity.endIndex, limitedBy: text.endIndex) ?? text.endIndex - if prevIndex < emojiEndIndex { - let emojis = String(text[prevIndex.. Date: Sun, 9 May 2021 19:37:25 -0500 Subject: [PATCH 17/21] Change variable name to make it compile with older versions of Xcode. --- .../Account/CloudKit/CloudKitAccountZoneDelegate.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Account/Sources/Account/CloudKit/CloudKitAccountZoneDelegate.swift b/Account/Sources/Account/CloudKit/CloudKitAccountZoneDelegate.swift index 8ff7fbe3f..bc1224836 100644 --- a/Account/Sources/Account/CloudKit/CloudKitAccountZoneDelegate.swift +++ b/Account/Sources/Account/CloudKit/CloudKitAccountZoneDelegate.swift @@ -107,7 +107,7 @@ class CloudKitAcountZoneDelegate: CloudKitZoneDelegate { folder?.externalID = record.externalID } - guard let folder = folder, let containerExternalID = folder.externalID else { return } + guard let container = folder, let containerExternalID = container.externalID else { return } if let newUnclaimedWebFeeds = newUnclaimedWebFeeds[containerExternalID] { for newUnclaimedWebFeed in newUnclaimedWebFeeds { @@ -116,7 +116,7 @@ class CloudKitAcountZoneDelegate: CloudKitZoneDelegate { editedName: newUnclaimedWebFeed.editedName, homePageURL: newUnclaimedWebFeed.homePageURL, webFeedExternalID: newUnclaimedWebFeed.webFeedExternalID, - container: folder) + container: container) } self.newUnclaimedWebFeeds.removeValue(forKey: containerExternalID) @@ -124,7 +124,7 @@ class CloudKitAcountZoneDelegate: CloudKitZoneDelegate { if let existingUnclaimedWebFeeds = existingUnclaimedWebFeeds[containerExternalID] { for existingUnclaimedWebFeed in existingUnclaimedWebFeeds { - folder.addWebFeed(existingUnclaimedWebFeed) + container.addWebFeed(existingUnclaimedWebFeed) } self.existingUnclaimedWebFeeds.removeValue(forKey: containerExternalID) } From f79a3e267516c0e02cea74c85bcd8935a0c50019 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Tue, 18 May 2021 19:35:24 -0500 Subject: [PATCH 18/21] Remove the deep signing code flag. --- xcconfig/NetNewsWire_macapp_target.xcconfig | 2 -- xcconfig/NetNewsWire_shareextension_target.xcconfig | 1 - 2 files changed, 3 deletions(-) diff --git a/xcconfig/NetNewsWire_macapp_target.xcconfig b/xcconfig/NetNewsWire_macapp_target.xcconfig index fe68dad83..604d5b147 100644 --- a/xcconfig/NetNewsWire_macapp_target.xcconfig +++ b/xcconfig/NetNewsWire_macapp_target.xcconfig @@ -37,5 +37,3 @@ DEVELOPER_ENTITLEMENTS = CODE_SIGN_ENTITLEMENTS = Mac/Resources/NetNewsWire$(DEVELOPER_ENTITLEMENTS).entitlements PRODUCT_BUNDLE_IDENTIFIER = $(ORGANIZATION_IDENTIFIER).NetNewsWire-Evergreen - -OTHER_CODE_SIGN_FLAGS = --deep diff --git a/xcconfig/NetNewsWire_shareextension_target.xcconfig b/xcconfig/NetNewsWire_shareextension_target.xcconfig index 96984d761..fa2973248 100644 --- a/xcconfig/NetNewsWire_shareextension_target.xcconfig +++ b/xcconfig/NetNewsWire_shareextension_target.xcconfig @@ -42,4 +42,3 @@ PRODUCT_NAME = $(TARGET_NAME) ASSETCATALOG_COMPILER_APPICON_NAME = SDKROOT = macosx -OTHER_CODE_SIGN_FLAGS = --deep From 0b170ebae7286c66e657d106731ebf90d6bf149e Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Thu, 20 May 2021 19:33:15 -0700 Subject: [PATCH 19/21] Bump version. --- xcconfig/common/NetNewsWire_mac_target_common.xcconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xcconfig/common/NetNewsWire_mac_target_common.xcconfig b/xcconfig/common/NetNewsWire_mac_target_common.xcconfig index 3936bba05..a81ce06f1 100644 --- a/xcconfig/common/NetNewsWire_mac_target_common.xcconfig +++ b/xcconfig/common/NetNewsWire_mac_target_common.xcconfig @@ -1,6 +1,6 @@ // High Level Settings common to both the Mac application and any extensions we bundle with it -MARKETING_VERSION = 6.0.2 -CURRENT_PROJECT_VERSION = 6032 +MARKETING_VERSION = 6.0.3b1 +CURRENT_PROJECT_VERSION = 6033 ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; From 844f5a9a6c71cde3ab733767a93f45cf226ecb0e Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Thu, 20 May 2021 19:43:56 -0700 Subject: [PATCH 20/21] Write change notes for 6.0.3b1. --- Technotes/ReleaseNotes-Mac.markdown | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Technotes/ReleaseNotes-Mac.markdown b/Technotes/ReleaseNotes-Mac.markdown index 1d914f1e3..c0da0e968 100644 --- a/Technotes/ReleaseNotes-Mac.markdown +++ b/Technotes/ReleaseNotes-Mac.markdown @@ -1,6 +1,16 @@ # Mac Release Notes -### 6.0.2 build 6.32 - 20 April 2021 +### 6.0.3b1 build 6033 - 20 May 2021 + +Feedly: handle API change with deleting and don’t show a spurious error +NewsBlur: don’t fetch articles marked hidden by NewsBlur +FreshRSS: add API endpoint URL example in setup form +iCloud: fixed bug not retaining feeds in a folder where the folder hasn’t been synced yet +Feeds list: smart feeds remain visible despite Hide Read Feeds setting +Keyboard shortcuts: fixed regression where L key wouldn’t go to next unread when feed is all read +Twitter extension: fixed weird bug where an extra https:/ could appear in tweet text + +### 6.0.2 build 6032 - 20 April 2021 Same as 6.0.2b1 From 09b1663157de2302f993bc7f504bfe40be794c44 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sun, 23 May 2021 13:26:54 -0700 Subject: [PATCH 21/21] =?UTF-8?q?Use=20RSParser=202.0.2=20and=20higher=20?= =?UTF-8?q?=E2=80=94=20make=20sure=20we=20have=20latest=20bug=20fixes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Account/Package.swift | 2 +- ArticlesDatabase/Package.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Account/Package.swift b/Account/Package.swift index 3d49c12e0..040712530 100644 --- a/Account/Package.swift +++ b/Account/Package.swift @@ -13,7 +13,7 @@ let package = Package( dependencies: [ .package(url: "https://github.com/Ranchero-Software/RSCore.git", .upToNextMajor(from: "1.0.0")), .package(url: "https://github.com/Ranchero-Software/RSDatabase.git", .upToNextMajor(from: "1.0.0")), - .package(url: "https://github.com/Ranchero-Software/RSParser.git", .upToNextMajor(from: "2.0.0")), + .package(url: "https://github.com/Ranchero-Software/RSParser.git", .upToNextMajor(from: "2.0.2")), .package(url: "https://github.com/Ranchero-Software/RSWeb.git", .upToNextMajor(from: "1.0.0")), .package(url: "../Articles", .upToNextMajor(from: "1.0.0")), .package(url: "../ArticlesDatabase", .upToNextMajor(from: "1.0.0")), diff --git a/ArticlesDatabase/Package.swift b/ArticlesDatabase/Package.swift index 6a9076bba..127979844 100644 --- a/ArticlesDatabase/Package.swift +++ b/ArticlesDatabase/Package.swift @@ -15,7 +15,7 @@ let package = Package( dependencies: [ .package(url: "https://github.com/Ranchero-Software/RSCore.git", .upToNextMajor(from: "1.0.0")), .package(url: "https://github.com/Ranchero-Software/RSDatabase.git", .upToNextMajor(from: "1.0.0")), - .package(url: "https://github.com/Ranchero-Software/RSParser.git", .upToNextMajor(from: "2.0.0")), + .package(url: "https://github.com/Ranchero-Software/RSParser.git", .upToNextMajor(from: "2.0.2")), .package(url: "../Articles", .upToNextMajor(from: "1.0.0")), ], targets: [