From ea0171cb2715a896fecf6dda6353a6d8ed1c05ed Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 17 Oct 2020 18:33:45 -0700 Subject: [PATCH 01/10] Bump version to 5.1.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 aaaab96b3..14aaab69a 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 = 5.1.1 -CURRENT_PROJECT_VERSION = 3012 +MARKETING_VERSION = 5.1.2b1 +CURRENT_PROJECT_VERSION = 3013 ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon From 065236ada398da8862715ab201298625ac34b741 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sun, 18 Oct 2020 18:27:36 -0500 Subject: [PATCH 02/10] Fix row background color. Issue #2503 --- Mac/MainWindow/Timeline/TimelineTableRowView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mac/MainWindow/Timeline/TimelineTableRowView.swift b/Mac/MainWindow/Timeline/TimelineTableRowView.swift index e7a78d6a2..44a4203ec 100644 --- a/Mac/MainWindow/Timeline/TimelineTableRowView.swift +++ b/Mac/MainWindow/Timeline/TimelineTableRowView.swift @@ -35,7 +35,7 @@ class TimelineTableRowView : NSTableRowView { } override func drawBackground(in dirtyRect: NSRect) { - NSColor.controlBackgroundColor.setFill() + NSColor.alternatingContentBackgroundColors[0].setFill() dirtyRect.fill() } From d504a4b1a8d707fca995231d3bb8047414d8cf3d Mon Sep 17 00:00:00 2001 From: Nate Weaver Date: Tue, 20 Oct 2020 12:02:27 -0500 Subject: [PATCH 03/10] Replace force-unwraps Fix for #2513. --- .../General/GeneralPrefencesViewController.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Mac/Preferences/General/GeneralPrefencesViewController.swift b/Mac/Preferences/General/GeneralPrefencesViewController.swift index 1ecfb3ff3..9d4b0c20b 100644 --- a/Mac/Preferences/General/GeneralPrefencesViewController.swift +++ b/Mac/Preferences/General/GeneralPrefencesViewController.swift @@ -202,10 +202,12 @@ private extension GeneralPreferencesViewController { menu.addItem(NSMenuItem.separator()) for browser in allBrowsers { - let item = NSMenuItem(title: browser.name!, action: nil, keyEquivalent: "") + guard let name = browser.name else { continue } + + let item = NSMenuItem(title: name, action: nil, keyEquivalent: "") item.representedObject = browser.bundleIdentifier - let icon = browser.icon! + let icon = browser.icon ?? NSWorkspace.shared.icon(forFileType: kUTTypeApplicationBundle as String) icon.size = NSSize(width: 16.0, height: 16.0) item.image = browser.icon menu.addItem(item) From 6588a141c2b8fc4ab95693be176aaefbfb4b1dd4 Mon Sep 17 00:00:00 2001 From: Nate Weaver Date: Tue, 20 Oct 2020 12:05:40 -0500 Subject: [PATCH 04/10] Make sure range.location isn't out-of-bounds Fix for #2512. --- Shared/Extensions/NSAttributedString+NetNewsWire.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Shared/Extensions/NSAttributedString+NetNewsWire.swift b/Shared/Extensions/NSAttributedString+NetNewsWire.swift index f778dfb75..98fb694b7 100644 --- a/Shared/Extensions/NSAttributedString+NetNewsWire.swift +++ b/Shared/Extensions/NSAttributedString+NetNewsWire.swift @@ -191,6 +191,8 @@ extension NSAttributedString { result.addAttribute(.font, value: baseFont, range: NSRange(location: 0, length: result.length)) for (range, styles) in attributeRanges { + if range.location >= result.length { continue } + let currentFont = result.attribute(.font, at: range.location, effectiveRange: nil) as! Font let currentDescriptor = currentFont.fontDescriptor var descriptor = currentDescriptor.copy() as! FontDescriptor From ef8709ed5c3bcde60b48697be52b881a30690c95 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Tue, 20 Oct 2020 15:02:27 -0500 Subject: [PATCH 05/10] Don't create the feed if it can't be downloaded. --- .../Account/LocalAccount/LocalAccountDelegate.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Frameworks/Account/LocalAccount/LocalAccountDelegate.swift b/Frameworks/Account/LocalAccount/LocalAccountDelegate.swift index 8b69cfe46..1980939fe 100644 --- a/Frameworks/Account/LocalAccount/LocalAccountDelegate.swift +++ b/Frameworks/Account/LocalAccount/LocalAccountDelegate.swift @@ -312,14 +312,14 @@ private extension LocalAccountDelegate { return } - let feed = account.createWebFeed(with: nil, url: url.absoluteString, webFeedID: url.absoluteString, homePageURL: nil) - feed.editedName = editedName - container.addWebFeed(feed) - InitialFeedDownloader.download(url) { parsedFeed in self.refreshProgress.completeTask() if let parsedFeed = parsedFeed { + let feed = account.createWebFeed(with: nil, url: url.absoluteString, webFeedID: url.absoluteString, homePageURL: nil) + feed.editedName = editedName + container.addWebFeed(feed) + account.update(feed, with: parsedFeed, {_ in BatchUpdate.shared.end() completion(.success(feed)) From 70194dd411fc6dea262ce908b5f9a620456588bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kiel=20Gillard=20=F0=9F=A4=AA?= Date: Mon, 26 Oct 2020 10:27:36 +1100 Subject: [PATCH 06/10] macOS: Ingest a change of feed name on Feedly into NNW. #2520 --- ...yCreateFeedsForCollectionFoldersOperation.swift | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Frameworks/Account/Feedly/Operations/FeedlyCreateFeedsForCollectionFoldersOperation.swift b/Frameworks/Account/Feedly/Operations/FeedlyCreateFeedsForCollectionFoldersOperation.swift index 264c046a1..b166d1e48 100644 --- a/Frameworks/Account/Feedly/Operations/FeedlyCreateFeedsForCollectionFoldersOperation.swift +++ b/Frameworks/Account/Feedly/Operations/FeedlyCreateFeedsForCollectionFoldersOperation.swift @@ -59,6 +59,20 @@ final class FeedlyCreateFeedsForCollectionFoldersOperation: FeedlyOperation { // find an existing feed previously added to the account if let feed = account.existingWebFeed(withWebFeedID: collectionFeed.id) { + + // If the feed was renamed on Feedly, ensure we ingest the new name. + if feed.nameForDisplay != collectionFeed.title { + feed.name = collectionFeed.title + + // Let the rest of the app (e.g.: the sidebar) know the feed name changed + // `editedName` would post this if its value is changing. + // Setting the `name` property has no side effects like this. + if feed.editedName != nil { + feed.editedName = nil + } else { + feed.postDisplayNameDidChangeNotification() + } + } return (feed, folder) } else { // find an existing feed we created below in an earlier value From 8846f145b9489407c41f27912a30f5ce52f2420c Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Mon, 26 Oct 2020 20:31:58 -0700 Subject: [PATCH 07/10] Bump version to 5.1.2b2. --- 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 14aaab69a..6d48f57c5 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 = 5.1.2b1 -CURRENT_PROJECT_VERSION = 3013 +MARKETING_VERSION = 5.1.2b2 +CURRENT_PROJECT_VERSION = 3014 ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon From 092d5efb3c9e10f342b532b44c5101a26cbf803c Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Thu, 29 Oct 2020 11:55:49 -0500 Subject: [PATCH 08/10] Allow the credentials to be updated for Feedbin. Fixes #2532 --- Mac/Preferences/Accounts/AccountsFeedbinWindowController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mac/Preferences/Accounts/AccountsFeedbinWindowController.swift b/Mac/Preferences/Accounts/AccountsFeedbinWindowController.swift index e6598cd5a..b022e75b5 100644 --- a/Mac/Preferences/Accounts/AccountsFeedbinWindowController.swift +++ b/Mac/Preferences/Accounts/AccountsFeedbinWindowController.swift @@ -58,7 +58,7 @@ class AccountsFeedbinWindowController: NSWindowController { return } - guard !AccountManager.shared.duplicateServiceAccount(type: .feedbin, username: usernameTextField.stringValue) else { + guard account != nil || !AccountManager.shared.duplicateServiceAccount(type: .feedbin, username: usernameTextField.stringValue) else { self.errorMessageLabel.stringValue = NSLocalizedString("There is already a Feedbin account with that username created.", comment: "Duplicate Error") return } From 1f4c0c45e249f0652c8570bc3f57130977e5a6b2 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Thu, 29 Oct 2020 17:49:08 -0700 Subject: [PATCH 09/10] Bump version to 5.1.2b3. --- 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 6d48f57c5..26714b81a 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 = 5.1.2b2 -CURRENT_PROJECT_VERSION = 3014 +MARKETING_VERSION = 5.1.2b3 +CURRENT_PROJECT_VERSION = 3015 ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon From 694bcb610f0ccb5f567213bac8f93b70300c5564 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Fri, 30 Oct 2020 22:43:33 -0700 Subject: [PATCH 10/10] Bump version to 5.1.2. --- 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 26714b81a..2e9918ef0 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 = 5.1.2b3 -CURRENT_PROJECT_VERSION = 3015 +MARKETING_VERSION = 5.1.2 +CURRENT_PROJECT_VERSION = 3016 ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon