From 7ded303ff32f9866bf6359faec13c1cd6d8470cd Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 27 Jun 2020 17:53:05 -0700 Subject: [PATCH 01/20] Bump version and build for 5.0.2 TestFlight. --- xcconfig/common/NetNewsWire_ios_target_common.xcconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xcconfig/common/NetNewsWire_ios_target_common.xcconfig b/xcconfig/common/NetNewsWire_ios_target_common.xcconfig index eb3906f45..efb37304e 100644 --- a/xcconfig/common/NetNewsWire_ios_target_common.xcconfig +++ b/xcconfig/common/NetNewsWire_ios_target_common.xcconfig @@ -1,7 +1,7 @@ // High Level Settings common to both the iOS application and any extensions we bundle with it -MARKETING_VERSION = 5.0.1 -CURRENT_PROJECT_VERSION = 46 +MARKETING_VERSION = 5.0.2 +CURRENT_PROJECT_VERSION = 47 ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon From 4ed6ccd52b4ea1bc186f65808f2ec29615469951 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 27 Jun 2020 18:15:26 -0700 Subject: [PATCH 02/20] =?UTF-8?q?Fixed=20warning=20from=20Apple=20upload?= =?UTF-8?q?=20system=20=E2=80=94=C2=A0NSExtensionActivationSupportsText=20?= =?UTF-8?q?needed=20to=20be=20a=20boolean,=20not=20a=20string.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iOS/ShareExtension/Info.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iOS/ShareExtension/Info.plist b/iOS/ShareExtension/Info.plist index 260decfa3..e48e3e175 100644 --- a/iOS/ShareExtension/Info.plist +++ b/iOS/ShareExtension/Info.plist @@ -33,7 +33,7 @@ NSExtensionActivationSupportsWebURLWithMaxCount 1 NSExtensionActivationSupportsText - 1 + NSExtensionJavaScriptPreprocessingFile SafariExt From 687b454cd74d6affbae8253264b0eec3eb4b9c13 Mon Sep 17 00:00:00 2001 From: Rizwan Mohamed Ibrahim Date: Wed, 1 Jul 2020 12:30:39 +0530 Subject: [PATCH 03/20] fix mark all as read context menu on Accounts --- iOS/MasterFeed/MasterFeedViewController.swift | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/iOS/MasterFeed/MasterFeedViewController.swift b/iOS/MasterFeed/MasterFeedViewController.swift index e2d8f5ef8..78b489345 100644 --- a/iOS/MasterFeed/MasterFeedViewController.swift +++ b/iOS/MasterFeed/MasterFeedViewController.swift @@ -547,7 +547,7 @@ extension MasterFeedViewController: UIContextMenuInteractionDelegate { var actions = [accountInfoAction, deactivateAction] - if let markAllAction = self.markAllAsReadAction(account: account) { + if let markAllAction = self.markAllAsReadAction(account: account, contentView: interaction.view) { actions.insert(markAllAction, at: 1) } @@ -1064,23 +1064,31 @@ private extension MasterFeedViewController { return markAllAsReadAction(articles: articles, nameForDisplay: articleFetcher.nameForDisplay, indexPath: indexPath) } - func markAllAsReadAction(account: Account) -> UIAction? { + func markAllAsReadAction(account: Account, contentView: UIView?) -> UIAction? { guard let fetchedArticles = try? account.fetchArticles(FetchType.unread) else { return nil } let articles = Array(fetchedArticles) - return markAllAsReadAction(articles: articles, nameForDisplay: account.nameForDisplay) + return markAllAsReadAction(articles: articles, nameForDisplay: account.nameForDisplay, contentView: contentView) } func markAllAsReadAction(articles: [Article], nameForDisplay: String, indexPath: IndexPath? = nil) -> UIAction? { - guard articles.canMarkAllAsRead(), let indexPath = indexPath, let contentView = self.tableView.cellForRow(at: indexPath)?.contentView else { + guard let indexPath = indexPath, + let contentView = self.tableView.cellForRow(at: indexPath)?.contentView else { + return nil + } + + return markAllAsReadAction(articles: articles, nameForDisplay: nameForDisplay, contentView: contentView) + } + + func markAllAsReadAction(articles: [Article], nameForDisplay: String, contentView: UIView?) -> UIAction? { + guard articles.canMarkAllAsRead(), let contentView = contentView else { return nil } let localizedMenuText = NSLocalizedString("Mark All as Read in “%@”", comment: "Command") let title = NSString.localizedStringWithFormat(localizedMenuText as NSString, nameForDisplay) as String - let action = UIAction(title: title, image: AppAssets.markAllAsReadImage) { [weak self] action in MarkAsReadAlertController.confirm(self, coordinator: self?.coordinator, confirmTitle: title, sourceType: contentView) { [weak self] in self?.coordinator.markAllAsRead(articles) From 9b6f04b8ac39c8c1bc06f3c898537de8c27e9adf Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 4 Jul 2020 11:43:54 -0700 Subject: [PATCH 04/20] Bump build to 48. --- xcconfig/common/NetNewsWire_ios_target_common.xcconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcconfig/common/NetNewsWire_ios_target_common.xcconfig b/xcconfig/common/NetNewsWire_ios_target_common.xcconfig index efb37304e..7d01f3746 100644 --- a/xcconfig/common/NetNewsWire_ios_target_common.xcconfig +++ b/xcconfig/common/NetNewsWire_ios_target_common.xcconfig @@ -1,7 +1,7 @@ // High Level Settings common to both the iOS application and any extensions we bundle with it MARKETING_VERSION = 5.0.2 -CURRENT_PROJECT_VERSION = 47 +CURRENT_PROJECT_VERSION = 48 ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon From e1c8479515d3c85f7bfb835fcf04c9084fd5be66 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Tue, 7 Jul 2020 11:47:52 -0500 Subject: [PATCH 05/20] Prevent Twitter embeds from cutting off. Issue #2166 --- Shared/Article Rendering/main.js | 2 ++ iOS/Resources/styleSheet.css | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Shared/Article Rendering/main.js b/Shared/Article Rendering/main.js index a3476f422..23e9b90dd 100644 --- a/Shared/Article Rendering/main.js +++ b/Shared/Article Rendering/main.js @@ -1,6 +1,8 @@ // Here we are making iframes responsive. Particularly useful for inline Youtube videos. function wrapFrames() { document.querySelectorAll("iframe").forEach(element => { + if (element.height > 0 || parseInt(element.style.height) > 0) + return; var wrapper = document.createElement("div"); wrapper.classList.add("iframeWrap"); element.parentNode.insertBefore(wrapper, element); diff --git a/iOS/Resources/styleSheet.css b/iOS/Resources/styleSheet.css index 5f403c4de..f49743c11 100644 --- a/iOS/Resources/styleSheet.css +++ b/iOS/Resources/styleSheet.css @@ -192,12 +192,17 @@ code, pre { padding: 0; } -img, figure, iframe, div { +img, figure, div { max-width: 100%; height: auto !important; margin: 0 auto; } +iframe { + max-width: 100%; + margin: 0 auto; +} + figure { margin-bottom: 1em; margin-top: 1em; From 88e409d2be05ab32dc0cb07abe6f259eaf3f39d1 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Tue, 7 Jul 2020 17:34:30 -0700 Subject: [PATCH 06/20] Bump build to 49. Nice square number. --- xcconfig/common/NetNewsWire_ios_target_common.xcconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcconfig/common/NetNewsWire_ios_target_common.xcconfig b/xcconfig/common/NetNewsWire_ios_target_common.xcconfig index 7d01f3746..3b2cfecaf 100644 --- a/xcconfig/common/NetNewsWire_ios_target_common.xcconfig +++ b/xcconfig/common/NetNewsWire_ios_target_common.xcconfig @@ -1,7 +1,7 @@ // High Level Settings common to both the iOS application and any extensions we bundle with it MARKETING_VERSION = 5.0.2 -CURRENT_PROJECT_VERSION = 48 +CURRENT_PROJECT_VERSION = 49 ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon From 7183b853bd3eec3d1098d1bc1ccf318d221320de Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Mon, 13 Jul 2020 14:24:57 +0800 Subject: [PATCH 07/20] #2256 Fixes #2256 --- Shared/Extensions/URL-Extensions.swift | 9 +++++++++ iOS/Article/WebViewController.swift | 1 + 2 files changed, 10 insertions(+) diff --git a/Shared/Extensions/URL-Extensions.swift b/Shared/Extensions/URL-Extensions.swift index 4fb9b8d7f..5cafe888a 100644 --- a/Shared/Extensions/URL-Extensions.swift +++ b/Shared/Extensions/URL-Extensions.swift @@ -15,4 +15,13 @@ extension URL { scheme == "mailto" ? URLComponents(url: self, resolvingAgainstBaseURL: false)?.path : nil } + func valueFor(_ parameter: String) -> String? { + guard let components = URLComponents(url: self, resolvingAgainstBaseURL: false), + let queryItems = components.queryItems, + let value = queryItems.first(where: { $0.name == parameter })?.value else { + return nil + } + return value + } + } diff --git a/iOS/Article/WebViewController.swift b/iOS/Article/WebViewController.swift index d702b0b87..6ce48e551 100644 --- a/iOS/Article/WebViewController.swift +++ b/iOS/Article/WebViewController.swift @@ -338,6 +338,7 @@ extension WebViewController: WKNavigationDelegate { if MFMailComposeViewController.canSendMail() { let mailComposeViewController = MFMailComposeViewController() mailComposeViewController.setToRecipients([emailAddress]) + mailComposeViewController.setSubject(url.valueFor("subject") ?? "") mailComposeViewController.mailComposeDelegate = self self.present(mailComposeViewController, animated: true, completion: {}) } else { From 1427e1d8c67958ca449fe3a8ec4bdb226bcdb6f7 Mon Sep 17 00:00:00 2001 From: Rizwan Mohamed Ibrahim Date: Tue, 14 Jul 2020 18:07:29 +0530 Subject: [PATCH 08/20] Add a11y label for expanded/collapsed status for Master Feed --- .../Cell/MasterFeedTableViewSectionHeader.swift | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift b/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift index 3fcf7506f..0742fcb47 100644 --- a/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift +++ b/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift @@ -21,12 +21,22 @@ class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView { get { if unreadCount > 0 { let unreadLabel = NSLocalizedString("unread", comment: "Unread label for accessiblity") - return "\(name) \(unreadCount) \(unreadLabel)" + return "\(name) \(unreadCount) \(unreadLabel) \(expandedStateMessage) " } else { - return name + return "\(name) \(expandedStateMessage) " } } } + + private var expandedStateMessage: String { + set {} + get { + if disclosureExpanded { + return NSLocalizedString("Expanded", comment: "Disclosure button expanded state for accessibility") + } + return NSLocalizedString("Collapsed", comment: "Disclosure button expanded state for accessibility") + } + } var unreadCount: Int { get { From 1a3bbf7dbf105bd9c50ce35b83ced8f652da455e Mon Sep 17 00:00:00 2001 From: Rizwan Mohamed Ibrahim Date: Tue, 14 Jul 2020 18:08:07 +0530 Subject: [PATCH 09/20] Add a11y label for starred status on master timeline --- iOS/MasterTimeline/Cell/MasterTimelineTableViewCell.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/iOS/MasterTimeline/Cell/MasterTimelineTableViewCell.swift b/iOS/MasterTimeline/Cell/MasterTimelineTableViewCell.swift index 813420cf6..76684e7f5 100644 --- a/iOS/MasterTimeline/Cell/MasterTimelineTableViewCell.swift +++ b/iOS/MasterTimeline/Cell/MasterTimelineTableViewCell.swift @@ -237,8 +237,9 @@ private extension MasterTimelineTableViewCell { } func updateAccessiblityLabel() { - var label = cellData.read ? "" : "\(NSLocalizedString("Unread", comment: "Unread")), " - label += "\(cellData.feedName), \(cellData.title), \(cellData.summary), \(cellData.dateString)" + let starredStatus = cellData.starred ? "\(NSLocalizedString("Starred", comment: "Favourites article for accessibility")), " : "" + let unreadStatus = cellData.read ? "" : "\(NSLocalizedString("Unread", comment: "Unread")), " + let label = starredStatus + unreadStatus + "\(cellData.feedName), \(cellData.title), \(cellData.summary), \(cellData.dateString)" accessibilityLabel = label } From 64a4d9bbe5c1d1d3761b47a9ffdfd4d62bafd6f5 Mon Sep 17 00:00:00 2001 From: Rizwan Mohamed Ibrahim Date: Tue, 14 Jul 2020 22:04:20 +0530 Subject: [PATCH 10/20] Fix localised comments --- iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift | 2 +- iOS/MasterTimeline/Cell/MasterTimelineTableViewCell.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift b/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift index 0742fcb47..dc5b21ed6 100644 --- a/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift +++ b/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift @@ -34,7 +34,7 @@ class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView { if disclosureExpanded { return NSLocalizedString("Expanded", comment: "Disclosure button expanded state for accessibility") } - return NSLocalizedString("Collapsed", comment: "Disclosure button expanded state for accessibility") + return NSLocalizedString("Collapsed", comment: "Disclosure button collapsed state for accessibility") } } diff --git a/iOS/MasterTimeline/Cell/MasterTimelineTableViewCell.swift b/iOS/MasterTimeline/Cell/MasterTimelineTableViewCell.swift index 76684e7f5..7d3a1b936 100644 --- a/iOS/MasterTimeline/Cell/MasterTimelineTableViewCell.swift +++ b/iOS/MasterTimeline/Cell/MasterTimelineTableViewCell.swift @@ -237,7 +237,7 @@ private extension MasterTimelineTableViewCell { } func updateAccessiblityLabel() { - let starredStatus = cellData.starred ? "\(NSLocalizedString("Starred", comment: "Favourites article for accessibility")), " : "" + let starredStatus = cellData.starred ? "\(NSLocalizedString("Starred", comment: "Starred article for accessibility")), " : "" let unreadStatus = cellData.read ? "" : "\(NSLocalizedString("Unread", comment: "Unread")), " let label = starredStatus + unreadStatus + "\(cellData.feedName), \(cellData.title), \(cellData.summary), \(cellData.dateString)" accessibilityLabel = label From 9fe512228d5a9c92098f92c9ed894cfdbb2af4e9 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 25 Jul 2020 17:34:51 -0700 Subject: [PATCH 11/20] Set read to 1, not to true. Not sure this ever worked. --- Frameworks/ArticlesDatabase/ArticlesTable.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Frameworks/ArticlesDatabase/ArticlesTable.swift b/Frameworks/ArticlesDatabase/ArticlesTable.swift index 0800450f8..294ee41f4 100644 --- a/Frameworks/ArticlesDatabase/ArticlesTable.swift +++ b/Frameworks/ArticlesDatabase/ArticlesTable.swift @@ -597,7 +597,7 @@ final class ArticlesTable: DatabaseTable { return } - let sql = "update statuses set read = true where dateArrived Date: Sun, 26 Jul 2020 05:46:27 -0400 Subject: [PATCH 12/20] fix iOS/Settings/SettingsViewController.swift --- iOS/Settings/SettingsViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iOS/Settings/SettingsViewController.swift b/iOS/Settings/SettingsViewController.swift index 0f3c47505..7ac0fbd48 100644 --- a/iOS/Settings/SettingsViewController.swift +++ b/iOS/Settings/SettingsViewController.swift @@ -205,7 +205,7 @@ class SettingsViewController: UITableViewController { openURL("https://ranchero.com/netnewswire/") tableView.selectRow(at: nil, animated: true, scrollPosition: .none) case 2: - openURL("https://github.com/brentsimmons/NetNewsWire/blob/master/Technotes/HowToSupportNetNewsWire.markdown") + openURL("https://github.com/brentsimmons/NetNewsWire/blob/main/Technotes/HowToSupportNetNewsWire.markdown") tableView.selectRow(at: nil, animated: true, scrollPosition: .none) case 3: openURL("https://github.com/brentsimmons/NetNewsWire") @@ -214,7 +214,7 @@ class SettingsViewController: UITableViewController { openURL("https://github.com/brentsimmons/NetNewsWire/issues") tableView.selectRow(at: nil, animated: true, scrollPosition: .none) case 5: - openURL("https://github.com/brentsimmons/NetNewsWire/tree/master/Technotes") + openURL("https://github.com/brentsimmons/NetNewsWire/tree/main/Technotes") tableView.selectRow(at: nil, animated: true, scrollPosition: .none) case 6: openURL("https://ranchero.com/netnewswire/slack") From e672f6c5ac301009e98e62c06630f5a484d92a5b Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Tue, 28 Jul 2020 17:47:52 -0500 Subject: [PATCH 13/20] Update to the maintenance branches of the submodules --- .../Account/FeedWrangler/FeedWranglerAccountDelegate.swift | 2 +- Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift | 2 +- Frameworks/Account/Feedly/Models/FeedlyEntryParser.swift | 1 + .../Account/Feedly/OAuthAuthorizationCodeGranting.swift | 4 ++-- Frameworks/Account/ReaderAPI/ReaderAPIAccountDelegate.swift | 2 +- iOS/Article/OpenInSafariActivity.swift | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Frameworks/Account/FeedWrangler/FeedWranglerAccountDelegate.swift b/Frameworks/Account/FeedWrangler/FeedWranglerAccountDelegate.swift index 8186e378b..6ed331340 100644 --- a/Frameworks/Account/FeedWrangler/FeedWranglerAccountDelegate.swift +++ b/Frameworks/Account/FeedWrangler/FeedWranglerAccountDelegate.swift @@ -511,7 +511,7 @@ private extension FeedWranglerAccountDelegate { let parsedItems = feedItems.map { (item: FeedWranglerFeedItem) -> ParsedItem in let itemID = String(item.feedItemID) // let authors = ... - let parsedItem = ParsedItem(syncServiceID: itemID, uniqueID: itemID, feedURL: String(item.feedID), url: nil, externalURL: item.url, title: item.title, contentHTML: item.body, contentText: nil, summary: nil, imageURL: nil, bannerImageURL: nil, datePublished: item.publishedDate, dateModified: item.updatedDate, authors: nil, tags: nil, attachments: nil) + let parsedItem = ParsedItem(syncServiceID: itemID, uniqueID: itemID, feedURL: String(item.feedID), url: nil, externalURL: item.url, title: item.title, language: nil, contentHTML: item.body, contentText: nil, summary: nil, imageURL: nil, bannerImageURL: nil, datePublished: item.publishedDate, dateModified: item.updatedDate, authors: nil, tags: nil, attachments: nil) return parsedItem } diff --git a/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift b/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift index 35818a012..3d6e7d19d 100644 --- a/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift +++ b/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift @@ -1233,7 +1233,7 @@ private extension FeedbinAccountDelegate { let parsedItems: [ParsedItem] = entries.map { entry in let authors = Set([ParsedAuthor(name: entry.authorName, url: entry.jsonFeed?.jsonFeedAuthor?.url, avatarURL: entry.jsonFeed?.jsonFeedAuthor?.avatarURL, emailAddress: nil)]) - return ParsedItem(syncServiceID: String(entry.articleID), uniqueID: String(entry.articleID), feedURL: String(entry.feedID), url: entry.url, externalURL: nil, title: entry.title, contentHTML: entry.contentHTML, contentText: nil, summary: entry.summary, imageURL: nil, bannerImageURL: nil, datePublished: entry.parsedDatePublished, dateModified: nil, authors: authors, tags: nil, attachments: nil) + return ParsedItem(syncServiceID: String(entry.articleID), uniqueID: String(entry.articleID), feedURL: String(entry.feedID), url: entry.url, externalURL: nil, title: entry.title, language: nil, contentHTML: entry.contentHTML, contentText: nil, summary: entry.summary, imageURL: nil, bannerImageURL: nil, datePublished: entry.parsedDatePublished, dateModified: nil, authors: authors, tags: nil, attachments: nil) } return Set(parsedItems) diff --git a/Frameworks/Account/Feedly/Models/FeedlyEntryParser.swift b/Frameworks/Account/Feedly/Models/FeedlyEntryParser.swift index 8af6714c7..2da2edc84 100644 --- a/Frameworks/Account/Feedly/Models/FeedlyEntryParser.swift +++ b/Frameworks/Account/Feedly/Models/FeedlyEntryParser.swift @@ -98,6 +98,7 @@ struct FeedlyEntryParser { url: nil, externalURL: externalUrl, title: title, + language: nil, contentHTML: contentHMTL, contentText: contentText, summary: summary, diff --git a/Frameworks/Account/Feedly/OAuthAuthorizationCodeGranting.swift b/Frameworks/Account/Feedly/OAuthAuthorizationCodeGranting.swift index 735f33bff..836989e78 100644 --- a/Frameworks/Account/Feedly/OAuthAuthorizationCodeGranting.swift +++ b/Frameworks/Account/Feedly/OAuthAuthorizationCodeGranting.swift @@ -70,12 +70,12 @@ public extension OAuthAuthorizationResponse { guard let queryItems = components.queryItems, !queryItems.isEmpty else { throw URLError(.unsupportedURL) } - let code = queryItems.firstElementPassingTest { $0.name.lowercased() == "code" } + let code = queryItems.first { $0.name.lowercased() == "code" } guard let codeValue = code?.value, !codeValue.isEmpty else { throw URLError(.unsupportedURL) } - let state = queryItems.firstElementPassingTest { $0.name.lowercased() == "state" } + let state = queryItems.first { $0.name.lowercased() == "state" } let stateValue = state?.value self.init(code: codeValue, state: stateValue) diff --git a/Frameworks/Account/ReaderAPI/ReaderAPIAccountDelegate.swift b/Frameworks/Account/ReaderAPI/ReaderAPIAccountDelegate.swift index ad55d4e6c..89095f3a0 100644 --- a/Frameworks/Account/ReaderAPI/ReaderAPIAccountDelegate.swift +++ b/Frameworks/Account/ReaderAPI/ReaderAPIAccountDelegate.swift @@ -932,7 +932,7 @@ private extension ReaderAPIAccountDelegate { // let authors = Set([ParsedAuthor(name: entry.authorName, url: entry.jsonFeed?.jsonFeedAuthor?.url, avatarURL: entry.jsonFeed?.jsonFeedAuthor?.avatarURL, emailAddress: nil)]) // let feed = account.idToFeedDictionary[entry.origin.streamId!]! // TODO clean this up - return ParsedItem(syncServiceID: entry.uniqueID(), uniqueID: entry.uniqueID(), feedURL: entry.origin.streamId!, url: nil, externalURL: entry.alternates.first?.url, title: entry.title, contentHTML: entry.summary.content, contentText: nil, summary: entry.summary.content, imageURL: nil, bannerImageURL: nil, datePublished: entry.parseDatePublished(), dateModified: nil, authors: nil, tags: nil, attachments: nil) + return ParsedItem(syncServiceID: entry.uniqueID(), uniqueID: entry.uniqueID(), feedURL: entry.origin.streamId!, url: nil, externalURL: entry.alternates.first?.url, title: entry.title, language: nil, contentHTML: entry.summary.content, contentText: nil, summary: entry.summary.content, imageURL: nil, bannerImageURL: nil, datePublished: entry.parseDatePublished(), dateModified: nil, authors: nil, tags: nil, attachments: nil) } return Set(parsedItems) diff --git a/iOS/Article/OpenInSafariActivity.swift b/iOS/Article/OpenInSafariActivity.swift index a157345fb..9b5b5ed8f 100644 --- a/iOS/Article/OpenInSafariActivity.swift +++ b/iOS/Article/OpenInSafariActivity.swift @@ -37,7 +37,7 @@ class OpenInSafariActivity: UIActivity { } override func perform() { - guard let url = activityItems?.firstElementPassingTest({ $0 is URL }) as? URL else { + guard let url = activityItems?.first(where: { $0 is URL }) as? URL else { activityDidFinish(false) return } From b7afc0a8335f3e549b1f4f127e09ff349c849d2f Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Tue, 28 Jul 2020 17:50:27 -0500 Subject: [PATCH 14/20] Upgrade to the latest maintenance submodules --- submodules/RSCore | 2 +- submodules/RSDatabase | 2 +- submodules/RSParser | 2 +- submodules/RSTree | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/submodules/RSCore b/submodules/RSCore index a175db500..34c17b358 160000 --- a/submodules/RSCore +++ b/submodules/RSCore @@ -1 +1 @@ -Subproject commit a175db5009f8222fcbaa825d9501305e8727da6f +Subproject commit 34c17b358b883936141a44db7cc5f3dd7e805267 diff --git a/submodules/RSDatabase b/submodules/RSDatabase index de7753914..73b827736 160000 --- a/submodules/RSDatabase +++ b/submodules/RSDatabase @@ -1 +1 @@ -Subproject commit de7753914c4f47aa97adfbe7a121acf0d2f8cd40 +Subproject commit 73b8277369c4d2d3729b7bb33c11bdd7350d81cb diff --git a/submodules/RSParser b/submodules/RSParser index 47ba87875..93ccfb0ea 160000 --- a/submodules/RSParser +++ b/submodules/RSParser @@ -1 +1 @@ -Subproject commit 47ba87875fbd026dccc2c4d4382a98cb4a1f1fbc +Subproject commit 93ccfb0ea5f46603045d0c3e726252b7c60b5060 diff --git a/submodules/RSTree b/submodules/RSTree index 2fc9b9cff..8cd9e07de 160000 --- a/submodules/RSTree +++ b/submodules/RSTree @@ -1 +1 @@ -Subproject commit 2fc9b9cff60032a272303ff6d6df5b39ec297179 +Subproject commit 8cd9e07de4bddebd62f803ca00e761e57f806813 From 16081b37f95a4dd2fda2ee30e41d8bc69185be57 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Tue, 28 Jul 2020 18:13:12 -0500 Subject: [PATCH 15/20] Revert "Upgrade to the latest maintenance submodules" This reverts commit b7afc0a8335f3e549b1f4f127e09ff349c849d2f. --- submodules/RSCore | 2 +- submodules/RSDatabase | 2 +- submodules/RSParser | 2 +- submodules/RSTree | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/submodules/RSCore b/submodules/RSCore index 34c17b358..a175db500 160000 --- a/submodules/RSCore +++ b/submodules/RSCore @@ -1 +1 @@ -Subproject commit 34c17b358b883936141a44db7cc5f3dd7e805267 +Subproject commit a175db5009f8222fcbaa825d9501305e8727da6f diff --git a/submodules/RSDatabase b/submodules/RSDatabase index 73b827736..de7753914 160000 --- a/submodules/RSDatabase +++ b/submodules/RSDatabase @@ -1 +1 @@ -Subproject commit 73b8277369c4d2d3729b7bb33c11bdd7350d81cb +Subproject commit de7753914c4f47aa97adfbe7a121acf0d2f8cd40 diff --git a/submodules/RSParser b/submodules/RSParser index 93ccfb0ea..47ba87875 160000 --- a/submodules/RSParser +++ b/submodules/RSParser @@ -1 +1 @@ -Subproject commit 93ccfb0ea5f46603045d0c3e726252b7c60b5060 +Subproject commit 47ba87875fbd026dccc2c4d4382a98cb4a1f1fbc diff --git a/submodules/RSTree b/submodules/RSTree index 8cd9e07de..2fc9b9cff 160000 --- a/submodules/RSTree +++ b/submodules/RSTree @@ -1 +1 @@ -Subproject commit 8cd9e07de4bddebd62f803ca00e761e57f806813 +Subproject commit 2fc9b9cff60032a272303ff6d6df5b39ec297179 From 18fd98424654ebc35be64f05cc3dbcea5a89c577 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Tue, 28 Jul 2020 18:13:35 -0500 Subject: [PATCH 16/20] Revert "Update to the maintenance branches of the submodules" This reverts commit e672f6c5ac301009e98e62c06630f5a484d92a5b. --- .../Account/FeedWrangler/FeedWranglerAccountDelegate.swift | 2 +- Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift | 2 +- Frameworks/Account/Feedly/Models/FeedlyEntryParser.swift | 1 - .../Account/Feedly/OAuthAuthorizationCodeGranting.swift | 4 ++-- Frameworks/Account/ReaderAPI/ReaderAPIAccountDelegate.swift | 2 +- iOS/Article/OpenInSafariActivity.swift | 2 +- 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Frameworks/Account/FeedWrangler/FeedWranglerAccountDelegate.swift b/Frameworks/Account/FeedWrangler/FeedWranglerAccountDelegate.swift index 6ed331340..8186e378b 100644 --- a/Frameworks/Account/FeedWrangler/FeedWranglerAccountDelegate.swift +++ b/Frameworks/Account/FeedWrangler/FeedWranglerAccountDelegate.swift @@ -511,7 +511,7 @@ private extension FeedWranglerAccountDelegate { let parsedItems = feedItems.map { (item: FeedWranglerFeedItem) -> ParsedItem in let itemID = String(item.feedItemID) // let authors = ... - let parsedItem = ParsedItem(syncServiceID: itemID, uniqueID: itemID, feedURL: String(item.feedID), url: nil, externalURL: item.url, title: item.title, language: nil, contentHTML: item.body, contentText: nil, summary: nil, imageURL: nil, bannerImageURL: nil, datePublished: item.publishedDate, dateModified: item.updatedDate, authors: nil, tags: nil, attachments: nil) + let parsedItem = ParsedItem(syncServiceID: itemID, uniqueID: itemID, feedURL: String(item.feedID), url: nil, externalURL: item.url, title: item.title, contentHTML: item.body, contentText: nil, summary: nil, imageURL: nil, bannerImageURL: nil, datePublished: item.publishedDate, dateModified: item.updatedDate, authors: nil, tags: nil, attachments: nil) return parsedItem } diff --git a/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift b/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift index 3d6e7d19d..35818a012 100644 --- a/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift +++ b/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift @@ -1233,7 +1233,7 @@ private extension FeedbinAccountDelegate { let parsedItems: [ParsedItem] = entries.map { entry in let authors = Set([ParsedAuthor(name: entry.authorName, url: entry.jsonFeed?.jsonFeedAuthor?.url, avatarURL: entry.jsonFeed?.jsonFeedAuthor?.avatarURL, emailAddress: nil)]) - return ParsedItem(syncServiceID: String(entry.articleID), uniqueID: String(entry.articleID), feedURL: String(entry.feedID), url: entry.url, externalURL: nil, title: entry.title, language: nil, contentHTML: entry.contentHTML, contentText: nil, summary: entry.summary, imageURL: nil, bannerImageURL: nil, datePublished: entry.parsedDatePublished, dateModified: nil, authors: authors, tags: nil, attachments: nil) + return ParsedItem(syncServiceID: String(entry.articleID), uniqueID: String(entry.articleID), feedURL: String(entry.feedID), url: entry.url, externalURL: nil, title: entry.title, contentHTML: entry.contentHTML, contentText: nil, summary: entry.summary, imageURL: nil, bannerImageURL: nil, datePublished: entry.parsedDatePublished, dateModified: nil, authors: authors, tags: nil, attachments: nil) } return Set(parsedItems) diff --git a/Frameworks/Account/Feedly/Models/FeedlyEntryParser.swift b/Frameworks/Account/Feedly/Models/FeedlyEntryParser.swift index 2da2edc84..8af6714c7 100644 --- a/Frameworks/Account/Feedly/Models/FeedlyEntryParser.swift +++ b/Frameworks/Account/Feedly/Models/FeedlyEntryParser.swift @@ -98,7 +98,6 @@ struct FeedlyEntryParser { url: nil, externalURL: externalUrl, title: title, - language: nil, contentHTML: contentHMTL, contentText: contentText, summary: summary, diff --git a/Frameworks/Account/Feedly/OAuthAuthorizationCodeGranting.swift b/Frameworks/Account/Feedly/OAuthAuthorizationCodeGranting.swift index 836989e78..735f33bff 100644 --- a/Frameworks/Account/Feedly/OAuthAuthorizationCodeGranting.swift +++ b/Frameworks/Account/Feedly/OAuthAuthorizationCodeGranting.swift @@ -70,12 +70,12 @@ public extension OAuthAuthorizationResponse { guard let queryItems = components.queryItems, !queryItems.isEmpty else { throw URLError(.unsupportedURL) } - let code = queryItems.first { $0.name.lowercased() == "code" } + let code = queryItems.firstElementPassingTest { $0.name.lowercased() == "code" } guard let codeValue = code?.value, !codeValue.isEmpty else { throw URLError(.unsupportedURL) } - let state = queryItems.first { $0.name.lowercased() == "state" } + let state = queryItems.firstElementPassingTest { $0.name.lowercased() == "state" } let stateValue = state?.value self.init(code: codeValue, state: stateValue) diff --git a/Frameworks/Account/ReaderAPI/ReaderAPIAccountDelegate.swift b/Frameworks/Account/ReaderAPI/ReaderAPIAccountDelegate.swift index 89095f3a0..ad55d4e6c 100644 --- a/Frameworks/Account/ReaderAPI/ReaderAPIAccountDelegate.swift +++ b/Frameworks/Account/ReaderAPI/ReaderAPIAccountDelegate.swift @@ -932,7 +932,7 @@ private extension ReaderAPIAccountDelegate { // let authors = Set([ParsedAuthor(name: entry.authorName, url: entry.jsonFeed?.jsonFeedAuthor?.url, avatarURL: entry.jsonFeed?.jsonFeedAuthor?.avatarURL, emailAddress: nil)]) // let feed = account.idToFeedDictionary[entry.origin.streamId!]! // TODO clean this up - return ParsedItem(syncServiceID: entry.uniqueID(), uniqueID: entry.uniqueID(), feedURL: entry.origin.streamId!, url: nil, externalURL: entry.alternates.first?.url, title: entry.title, language: nil, contentHTML: entry.summary.content, contentText: nil, summary: entry.summary.content, imageURL: nil, bannerImageURL: nil, datePublished: entry.parseDatePublished(), dateModified: nil, authors: nil, tags: nil, attachments: nil) + return ParsedItem(syncServiceID: entry.uniqueID(), uniqueID: entry.uniqueID(), feedURL: entry.origin.streamId!, url: nil, externalURL: entry.alternates.first?.url, title: entry.title, contentHTML: entry.summary.content, contentText: nil, summary: entry.summary.content, imageURL: nil, bannerImageURL: nil, datePublished: entry.parseDatePublished(), dateModified: nil, authors: nil, tags: nil, attachments: nil) } return Set(parsedItems) diff --git a/iOS/Article/OpenInSafariActivity.swift b/iOS/Article/OpenInSafariActivity.swift index 9b5b5ed8f..a157345fb 100644 --- a/iOS/Article/OpenInSafariActivity.swift +++ b/iOS/Article/OpenInSafariActivity.swift @@ -37,7 +37,7 @@ class OpenInSafariActivity: UIActivity { } override func perform() { - guard let url = activityItems?.first(where: { $0 is URL }) as? URL else { + guard let url = activityItems?.firstElementPassingTest({ $0 is URL }) as? URL else { activityDidFinish(false) return } From 1c4b6b4c260812ac27f6525b7bf216da2606ba45 Mon Sep 17 00:00:00 2001 From: Rizwan Mohamed Ibrahim Date: Wed, 29 Jul 2020 11:37:27 +0530 Subject: [PATCH 17/20] Fix a11y for title view of timeline view controller --- iOS/MasterTimeline/MasterTimelineTitleView.swift | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/iOS/MasterTimeline/MasterTimelineTitleView.swift b/iOS/MasterTimeline/MasterTimelineTitleView.swift index 76e4fbbaa..9c81ac7ee 100644 --- a/iOS/MasterTimeline/MasterTimelineTitleView.swift +++ b/iOS/MasterTimeline/MasterTimelineTitleView.swift @@ -18,7 +18,20 @@ class MasterTimelineTitleView: UIView { private lazy var pointerInteraction: UIPointerInteraction = { UIPointerInteraction(delegate: self) }() - + + override var accessibilityLabel: String? { + set { } + get { + if let name = label.text { + let unreadLabel = NSLocalizedString("unread", comment: "Unread label for accessiblity") + return "\(name) \(unreadCountView.unreadCount) \(unreadLabel)" + } + else { + return nil + } + } + } + func buttonize() { heightAnchor.constraint(equalToConstant: 40.0).isActive = true accessibilityTraits = .button @@ -28,6 +41,7 @@ class MasterTimelineTitleView: UIView { } func debuttonize() { + heightAnchor.constraint(equalToConstant: 40.0).isActive = true accessibilityTraits.remove(.button) if #available(iOS 13.4, *) { removeInteraction(pointerInteraction) From 517b73b341015d1cc2a0201041729e2a355900e8 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Thu, 30 Jul 2020 20:03:38 -0700 Subject: [PATCH 18/20] Remove unused withLimits parameter. --- Frameworks/ArticlesDatabase/ArticlesTable.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Frameworks/ArticlesDatabase/ArticlesTable.swift b/Frameworks/ArticlesDatabase/ArticlesTable.swift index 294ee41f4..f1c59a90d 100644 --- a/Frameworks/ArticlesDatabase/ArticlesTable.swift +++ b/Frameworks/ArticlesDatabase/ArticlesTable.swift @@ -47,11 +47,11 @@ final class ArticlesTable: DatabaseTable { // MARK: - Fetching Articles for Feed func fetchArticles(_ webFeedID: String) throws -> Set
{ - return try fetchArticles{ self.fetchArticlesForFeedID(webFeedID, withLimits: true, $0) } + return try fetchArticles{ self.fetchArticlesForFeedID(webFeedID, $0) } } func fetchArticlesAsync(_ webFeedID: String, _ completion: @escaping ArticleSetResultBlock) { - fetchArticlesAsync({ self.fetchArticlesForFeedID(webFeedID, withLimits: true, $0) }, completion) + fetchArticlesAsync({ self.fetchArticlesForFeedID(webFeedID, $0) }, completion) } func fetchArticles(_ webFeedIDs: Set) throws -> Set
{ @@ -203,7 +203,7 @@ final class ArticlesTable: DatabaseTable { return } - let fetchedArticles = self.fetchArticlesForFeedID(webFeedID, withLimits: false, database) //4 + let fetchedArticles = self.fetchArticlesForFeedID(webFeedID, database) //4 let fetchedArticlesDictionary = fetchedArticles.dictionary() let newArticles = self.findAndSaveNewArticles(incomingArticles, fetchedArticlesDictionary, database) //5 @@ -803,7 +803,7 @@ private extension ArticlesTable { return fetchArticlesWithWhereClause(database, whereClause: whereClause, parameters: parameters) } - func fetchArticlesForFeedID(_ webFeedID: String, withLimits: Bool, _ database: FMDatabase) -> Set
{ + func fetchArticlesForFeedID(_ webFeedID: String, _ database: FMDatabase) -> Set
{ return fetchArticlesWithWhereClause(database, whereClause: "articles.feedID = ?", parameters: [webFeedID as AnyObject]) } From 462753e06b70cc39cae29f37d3137f523163d312 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Mon, 10 Aug 2020 22:16:45 -0700 Subject: [PATCH 19/20] Update credits. --- iOS/Resources/Credits.rtf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iOS/Resources/Credits.rtf b/iOS/Resources/Credits.rtf index a4c868701..1ccb2905a 100644 --- a/iOS/Resources/Credits.rtf +++ b/iOS/Resources/Credits.rtf @@ -1,4 +1,4 @@ -{\rtf1\ansi\ansicpg1252\cocoartf2511 +{\rtf1\ansi\ansicpg1252\cocoartf2513 \cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 LucidaGrande;} {\colortbl;\red255\green255\blue255;\red0\green0\blue0;} {\*\expandedcolortbl;;\cssrgb\c0\c0\c0\cname textColor;} @@ -17,4 +17,4 @@ Under-the-hood magic and CSS stylin\'92s: {\field{\*\fldinst{HYPERLINK "https:// \pard\pardeftab720\li355\fi-356\sa60\partightenfactor0 \cf2 Help book: {\field{\*\fldinst{HYPERLINK "https://nostodnayr.net/"}}{\fldrslt Ryan Dotson}}\ \pard\pardeftab720\li358\fi-359\sa60\partightenfactor0 -\cf2 And more {\field{\*\fldinst{HYPERLINK "https://github.com/brentsimmons/NetNewsWire/graphs/contributors"}}{\fldrslt contributors}}!} \ No newline at end of file +\cf2 And featuring contributions from {\field{\*\fldinst{HYPERLINK "https://blog.rizwan.dev/"}}{\fldrslt Rizwan Mohamed Ibrahim}}, {\field{\*\fldinst{HYPERLINK "https://stuartbreckenridge.com/"}}{\fldrslt Stuart Breckenridge}}, {\field{\*\fldinst{HYPERLINK "https://twitter.com/philviso"}}{\fldrslt Phil Viso}}, and {\field{\*\fldinst{HYPERLINK "https://github.com/Ranchero-Software/NetNewsWire/graphs/contributors"}}{\fldrslt many more}}!} \ No newline at end of file From c2d39318f9501cc338df5e1a3da1a57c109d7f69 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Mon, 10 Aug 2020 22:17:08 -0700 Subject: [PATCH 20/20] Bump version to 5.0.3. --- xcconfig/common/NetNewsWire_ios_target_common.xcconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xcconfig/common/NetNewsWire_ios_target_common.xcconfig b/xcconfig/common/NetNewsWire_ios_target_common.xcconfig index 3b2cfecaf..24e4615db 100644 --- a/xcconfig/common/NetNewsWire_ios_target_common.xcconfig +++ b/xcconfig/common/NetNewsWire_ios_target_common.xcconfig @@ -1,7 +1,7 @@ // High Level Settings common to both the iOS application and any extensions we bundle with it -MARKETING_VERSION = 5.0.2 -CURRENT_PROJECT_VERSION = 49 +MARKETING_VERSION = 5.0.3 +CURRENT_PROJECT_VERSION = 50 ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon