mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-30 17:29:23 +00:00
Merge branch 'main' into readable-theme
This commit is contained in:
commit
36c47cda8d
25 files changed
+609
-279
No files matched your search
+11
-129
@@ -7,146 +7,28 @@
|
||||
<language>en</language>
|
||||
|
||||
<item>
|
||||
<title>NetNewsWire 6.1.10b2</title>
|
||||
<title>NetNewsWire 6.1.10b4</title>
|
||||
<description><![CDATA[
|
||||
<ul>
|
||||
<li>Fixed bug, introduced in previous test build, that prevented adding a Feedly account</li>
|
||||
<li>Adopt secure state restoration; fix bug with state restoration not working in previous betas.</li>
|
||||
</ul>
|
||||
]]></description>
|
||||
<pubDate>Tue, 13 May 2025 09:00:00 -0700</pubDate>
|
||||
<enclosure url="https://github.com/Ranchero-Software/NetNewsWire/releases/download/mac-6.1.10b2/NetNewsWire6.1.10b2.zip" sparkle:version="6137" sparkle:shortVersionString="6.1.10b2" length="9382872" type="application/zip" />
|
||||
<pubDate>Sat, 16 Aug 2025 10:10:00 -0700</pubDate>
|
||||
<enclosure url="https://github.com/Ranchero-Software/NetNewsWire/releases/download/mac-6.1.10b4/NetNewsWire6.1.10b4.zip" sparkle:version="6139" sparkle:shortVersionString="6.1.10b4" length="9396988" type="application/zip" />
|
||||
<sparkle:minimumSystemVersion>13.0</sparkle:minimumSystemVersion>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>NetNewsWire 6.1.10b1</title>
|
||||
<description><![CDATA[
|
||||
<title>NetNewsWire 6.1.10b3</title>
|
||||
<description><![CDATA[
|
||||
<ul>
|
||||
<li>Added caching to the downloader (the one that downloads feed icons, favicons, etc.) — make fewer network requests</li>
|
||||
<li>Worked around The Verge’s bug with character encoding</li>
|
||||
<li>Fixed bug where links in footnotes — in light mode, using the default theme — would be invisible</li>
|
||||
<li>Fixed double-underlines on 404 Media links. (Fixed bug where using <u> tag inside an <a> would cause two underlines.)</li>
|
||||
<li>Added &smallcircle; to the entities decoder</li>
|
||||
<li>Synced the Mac default theme with the iOS version</li>
|
||||
<li>Fixed bug, introduced in previous test build, that prevented choosing an OPML file to import</li>
|
||||
</ul>
|
||||
]]></description>
|
||||
<pubDate>Wed, 07 May 2025 22:00:00 -0700</pubDate>
|
||||
<enclosure url="https://github.com/Ranchero-Software/NetNewsWire/releases/download/mac-6.1.10b1/NetNewsWire6.1.10b1.zip" sparkle:version="6136" sparkle:shortVersionString="6.1.10b1" length="9382514" type="application/zip" />
|
||||
<sparkle:minimumSystemVersion>13.0</sparkle:minimumSystemVersion>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>NetNewsWire 6.1b2</title>
|
||||
<description><![CDATA[
|
||||
<p>Article themes. Several themes ship with the app, and you can create your own. You can change the theme in Preferences or by adding the theme switcher to the toolbar.</p>
|
||||
<p>Copy URLs using repaired, rather than raw, feed links.</p>
|
||||
<p>Restore article scroll position on relaunching app.</p>
|
||||
<p>Added Copy Article URL and Copy External URL commands to the Edit menu.</p>
|
||||
<p>Fixed a bug where using cmd-Q wouldn’t always quit the app as quickly as one might prefer.</p>
|
||||
<p>Disallow creation of iCloud account in the app if iCloud and iCloud Drive aren’t both enabled.</p>
|
||||
<p>Fixed bug showing quote tweets that only included an image.</p>
|
||||
<p>Added a hidden pref to suppress downloading/syncing on start: `defaults write com.ranchero.NetNewsWire-Evergreen DevroeSuppressSyncOnLaunch -bool true`</p>
|
||||
<p>Video autoplay is now disallowed.</p>
|
||||
<p>Article view now supports RTL layout.</p>
|
||||
]]></description>
|
||||
<pubDate>Mon, 17 Jan 2022 17:45:00 -0800</pubDate>
|
||||
<enclosure url="https://github.com/Ranchero-Software/NetNewsWire/releases/download/mac-6.1b2/NetNewsWire6.1b2.zip" sparkle:version="6101" sparkle:shortVersionString="6.1b2" length="10841318" type="application/zip" />
|
||||
<sparkle:minimumSystemVersion>10.15.0</sparkle:minimumSystemVersion>
|
||||
</item>
|
||||
|
||||
|
||||
<item>
|
||||
<title>NetNewsWire 6.0.3</title>
|
||||
<description><![CDATA[
|
||||
<p>Same as 6.0.3b2 except for the version number.</p>
|
||||
]]></description>
|
||||
<pubDate>Sun, 05 Sep 2021 12:20:00 -0700</pubDate>
|
||||
<enclosure url="https://github.com/Ranchero-Software/NetNewsWire/releases/download/mac-6.0.3/NetNewsWire6.0.3.zip" sparkle:version="6035" sparkle:shortVersionString="6.0.3" length="10477066" type="application/zip" />
|
||||
<sparkle:minimumSystemVersion>10.15.0</sparkle:minimumSystemVersion>
|
||||
</item>
|
||||
|
||||
|
||||
<item>
|
||||
<title>NetNewsWire 6.0.3b2</title>
|
||||
<description><![CDATA[
|
||||
<p>Feedly: preserve custom feed names with Feedly when moving them between folders</p>
|
||||
<p>Preferences: use full-width row style in accounts and extensions panes</p>
|
||||
<p>Fixed a crashing bug triggered by running some UI code outside of main thread</p>
|
||||
<p>Fixed a crashing bug that could happen when the app tries to find a feed for a website</p>
|
||||
<p>Fixed a crashing bug that could happen when rendering tweets</p>
|
||||
<p>Changed how images are placed in Twitter articles so that you can better see who Tweeted the image</p>
|
||||
<p>Fixed bug where iCloud syncing could stop prematurely when the sync database has records not in the local database</p>
|
||||
<p>Fixed bug where favicons wouldn’t be found when a home page URL has non-ASCII characters</p>
|
||||
<p>Fixed bug where external URLs in Feedbin feeds might be lost</p>
|
||||
<p>Fixed bug where words prepended with $ wouldn’t appear in Twitter feeds</p>
|
||||
<p>Fixed bug where newlines would be just a space in Twitter feeds</p>
|
||||
<p>Fixed bug where BazQux-synced feeds might stop updating</p>
|
||||
]]></description>
|
||||
<pubDate>Sun, 29 Aug 2021 15:25:00 -0700</pubDate>
|
||||
<enclosure url="https://github.com/Ranchero-Software/NetNewsWire/releases/download/mac-6.0.3b2/NetNewsWire6.0.3b2.zip" sparkle:version="6034" sparkle:shortVersionString="6.0.3b2" length="10477006" type="application/zip" />
|
||||
<sparkle:minimumSystemVersion>10.15.0</sparkle:minimumSystemVersion>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>NetNewsWire 6.0.3b1</title>
|
||||
<description><![CDATA[
|
||||
<p>Feedly: handle API change with deleting and don’t show a spurious error</p>
|
||||
<p>NewsBlur: don’t fetch articles marked hidden by NewsBlur</p>
|
||||
<p>FreshRSS: add API endpoint URL example in setup form</p>
|
||||
<p>iCloud: fixed bug not retaining feeds in a folder where the folder hasn’t been synced yet</p>
|
||||
<p>Feeds list: smart feeds remain visible despite Hide Read Feeds setting</p>
|
||||
<p>Keyboard shortcuts: fixed regression where L key wouldn’t go to next unread when feed is all read</p>
|
||||
<p>Twitter extension: fixed weird bug where an extra https:/ could appear in tweet text</p>
|
||||
]]></description>
|
||||
<pubDate>Thu, 20 May 2021 20:00:00 -0700</pubDate>
|
||||
<enclosure url="https://github.com/Ranchero-Software/NetNewsWire/releases/download/mac-6.0.3b1/NetNewsWire6.0.3b1.zip" sparkle:version="6033" sparkle:shortVersionString="6.0.3b1" length="10463681" type="application/zip" />
|
||||
<sparkle:minimumSystemVersion>10.15.0</sparkle:minimumSystemVersion>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>NetNewsWire 6.0.2</title>
|
||||
<description><![CDATA[
|
||||
<p>Same as 6.0.2b1 — no changes other than version</p>
|
||||
]]></description>
|
||||
<pubDate>Tue, 20 Apr 2021 17:40:00 -0700</pubDate>
|
||||
<enclosure url="https://github.com/Ranchero-Software/NetNewsWire/releases/download/mac-6.0.2/NetNewsWire6.0.2.zip" sparkle:version="6032" sparkle:shortVersionString="6.0.2" length="10453603" type="application/zip" />
|
||||
<sparkle:minimumSystemVersion>10.15.0</sparkle:minimumSystemVersion>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>NetNewsWire 6.0.2b1</title>
|
||||
<description><![CDATA[
|
||||
<p>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</p>
|
||||
<p>Fixed regression with the L key — now works properly again</p>
|
||||
]]></description>
|
||||
<pubDate>Thu, 15 Apr 2021 19:15:00 -0700</pubDate>
|
||||
<enclosure url="https://github.com/Ranchero-Software/NetNewsWire/releases/download/mac-6.0.2b1/NetNewsWire6.0.2b1.zip" sparkle:version="6031" sparkle:shortVersionString="6.0.2b1" length="10453628" type="application/zip" />
|
||||
<sparkle:minimumSystemVersion>10.15.0</sparkle:minimumSystemVersion>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>NetNewsWire 6.0.1</title>
|
||||
<description><![CDATA[
|
||||
<p>Adjusted layout of the add account sheet so that it fits on smaller monitors</p>
|
||||
<p>Sidebar: properly scale the smart feed icons when sidebar is set to large size in System Preferences </p>
|
||||
]]></description>
|
||||
<pubDate>Thu, 01 Apr 2021 20:22:00 -0700</pubDate>
|
||||
<enclosure url="https://github.com/Ranchero-Software/NetNewsWire/releases/download/mac-6.0.1/NetNewsWire6.0.1.zip" sparkle:version="6030" sparkle:shortVersionString="6.0.1" length="10448727" type="application/zip" />
|
||||
<sparkle:minimumSystemVersion>10.15.0</sparkle:minimumSystemVersion>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>NetNewsWire 6.0.1b2</title>
|
||||
<description><![CDATA[
|
||||
<p>Twitter: fixed a date parsing bug that could affect people in some locales, which would prevent Twitter feeds from working for them</p>
|
||||
<p>Feeds list: fixed bug where newly added feed would be called Untitled past the time when the app actually knows its name</p>
|
||||
<p>Fixed bug where next-unread command wouldn’t wrap around when you got to the bottom of the Feeds list</p>
|
||||
]]></description>
|
||||
<pubDate>Mon, 29 Mar 2021 20:55:00 -0700</pubDate>
|
||||
<enclosure url="https://github.com/Ranchero-Software/NetNewsWire/releases/download/mac-6.0.1b2/NetNewsWire6.0.1b2.zip" sparkle:version="6029" sparkle:shortVersionString="6.0.1b2" length="10445067" type="application/zip" />
|
||||
<sparkle:minimumSystemVersion>10.15.0</sparkle:minimumSystemVersion>
|
||||
</item>
|
||||
|
||||
<pubDate>Tue, 12 Aug 2025 10:10:00 -0700</pubDate>
|
||||
<enclosure url="https://github.com/Ranchero-Software/NetNewsWire/releases/download/mac-6.1.10b3/NetNewsWire6.1.10b3.zip" sparkle:version="6138" sparkle:shortVersionString="6.1.10b3" length="9383040" type="application/zip" />
|
||||
<sparkle:minimumSystemVersion>13.0</sparkle:minimumSystemVersion>
|
||||
</item>
|
||||
|
||||
</channel>
|
||||
</rss>
|
||||
+19
-6
@@ -23,7 +23,8 @@ final class AppDefaults {
|
||||
|
||||
struct Key {
|
||||
static let firstRunDate = "firstRunDate"
|
||||
static let windowState = "windowState"
|
||||
static let legacyWindowState = "windowState"
|
||||
static let secureWindowState = "secureWindowState"
|
||||
static let lastImageCacheFlushDate = "lastImageCacheFlushDate"
|
||||
static let sidebarFontSize = "sidebarFontSize"
|
||||
static let timelineFontSize = "timelineFontSize"
|
||||
@@ -73,16 +74,28 @@ final class AppDefaults {
|
||||
firstRunDate = Date()
|
||||
return true
|
||||
}()
|
||||
|
||||
var windowState: [AnyHashable : Any]? {
|
||||
|
||||
/// Stores window state prior to switching to secure state restoration.
|
||||
///
|
||||
/// This is referenced temporarily, only to be able to provide migration from legacy to secure window state.
|
||||
/// TODO: delete for NetNewsWire 7.
|
||||
var legacyWindowState: [AnyHashable: Any]? {
|
||||
UserDefaults.standard.object(forKey: Key.legacyWindowState) as? [AnyHashable: Any]
|
||||
}
|
||||
|
||||
func deleteLegacyWindowState() {
|
||||
UserDefaults.standard.removeObject(forKey: Key.legacyWindowState)
|
||||
}
|
||||
|
||||
var secureWindowState: Data? {
|
||||
get {
|
||||
return UserDefaults.standard.object(forKey: Key.windowState) as? [AnyHashable : Any]
|
||||
UserDefaults.standard.object(forKey: Key.secureWindowState) as? Data
|
||||
}
|
||||
set {
|
||||
UserDefaults.standard.set(newValue, forKey: Key.windowState)
|
||||
UserDefaults.standard.set(newValue, forKey: Key.secureWindowState)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var lastImageCacheFlushDate: Date? {
|
||||
get {
|
||||
return AppDefaults.date(for: Key.lastImageCacheFlushDate)
|
||||
|
||||
@@ -302,6 +302,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
return false
|
||||
}
|
||||
|
||||
func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func applicationDidBecomeActive(_ notification: Notification) {
|
||||
fireOldTimers()
|
||||
}
|
||||
|
||||
@@ -28,6 +28,10 @@ final class DetailViewController: NSViewController, WKUIDelegate {
|
||||
private lazy var regularWebViewController = createWebViewController()
|
||||
private var searchWebViewController: DetailWebViewController?
|
||||
|
||||
var windowState: DetailWindowState {
|
||||
currentWebViewController.windowState
|
||||
}
|
||||
|
||||
private var currentWebViewController: DetailWebViewController! {
|
||||
didSet {
|
||||
let webview = currentWebViewController.view
|
||||
@@ -107,13 +111,6 @@ final class DetailViewController: NSViewController, WKUIDelegate {
|
||||
}
|
||||
window.makeFirstResponderUnlessDescendantIsFirstResponder(currentWebViewController.webView)
|
||||
}
|
||||
|
||||
// MARK: State Restoration
|
||||
|
||||
func saveState(to state: inout [AnyHashable : Any]) {
|
||||
currentWebViewController.saveState(to: &state)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: - DetailWebViewControllerDelegate
|
||||
|
||||
@@ -35,6 +35,10 @@ final class DetailWebViewController: NSViewController {
|
||||
}
|
||||
}
|
||||
|
||||
var windowState: DetailWindowState {
|
||||
DetailWindowState(isShowingExtractedArticle: isShowingExtractedArticle, windowScrollY: windowScrollY ?? 0)
|
||||
}
|
||||
|
||||
var article: Article? {
|
||||
switch state {
|
||||
case .article(let article, _):
|
||||
@@ -204,14 +208,6 @@ final class DetailWebViewController: NSViewController {
|
||||
override func scrollPageUp(_ sender: Any?) {
|
||||
webView.scrollPageUp(sender)
|
||||
}
|
||||
|
||||
// MARK: State Restoration
|
||||
|
||||
func saveState(to state: inout [AnyHashable : Any]) {
|
||||
state[UserInfoKey.isShowingExtractedArticle] = isShowingExtractedArticle
|
||||
state[UserInfoKey.articleWindowScrollY] = windowScrollY
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: - WKScriptMessageHandler
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// DetailWindowState.swift
|
||||
// NetNewsWire
|
||||
//
|
||||
// Created by Maurice Parker on 12/16/23.
|
||||
// Copyright © 2023 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
final class DetailWindowState: NSObject, NSSecureCoding {
|
||||
|
||||
static let supportsSecureCoding = true
|
||||
|
||||
let isShowingExtractedArticle: Bool
|
||||
let windowScrollY: CGFloat
|
||||
|
||||
init(isShowingExtractedArticle: Bool, windowScrollY: CGFloat) {
|
||||
self.isShowingExtractedArticle = isShowingExtractedArticle
|
||||
self.windowScrollY = windowScrollY
|
||||
}
|
||||
|
||||
private struct Key {
|
||||
static let isShowingExtractedArticle = "isShowingExtractedArticle"
|
||||
static let windowScrollY = "windowScrollY"
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
isShowingExtractedArticle = coder.decodeBool(forKey: Key.isShowingExtractedArticle)
|
||||
windowScrollY = CGFloat(coder.decodeDouble(forKey: Key.windowScrollY))
|
||||
}
|
||||
|
||||
func encode(with coder: NSCoder) {
|
||||
coder.encode(isShowingExtractedArticle, forKey: Key.isShowingExtractedArticle)
|
||||
coder.encode(Double(windowScrollY), forKey: Key.windowScrollY)
|
||||
}
|
||||
}
|
||||
@@ -130,17 +130,24 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
|
||||
}
|
||||
|
||||
func saveStateToUserDefaults() {
|
||||
AppDefaults.shared.windowState = savableState()
|
||||
let data = try? NSKeyedArchiver.archivedData(withRootObject: savableState(), requiringSecureCoding: true)
|
||||
AppDefaults.shared.secureWindowState = data
|
||||
window?.saveFrame(usingName: windowAutosaveName)
|
||||
}
|
||||
|
||||
func restoreStateFromUserDefaults() {
|
||||
if let state = AppDefaults.shared.windowState {
|
||||
if let data = AppDefaults.shared.secureWindowState,
|
||||
let state = try? NSKeyedUnarchiver.unarchivedObject(ofClass: MainWindowState.self, from: data) {
|
||||
restoreState(from: state)
|
||||
window?.setFrameUsingName(windowAutosaveName, force: true)
|
||||
} else if let state = AppDefaults.shared.legacyWindowState {
|
||||
// Migrate from previous window state data. Delete data when finished.
|
||||
restoreLegacyState(from: state)
|
||||
window?.setFrameUsingName(windowAutosaveName, force: true)
|
||||
AppDefaults.shared.deleteLegacyWindowState()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Notifications
|
||||
|
||||
@objc func refreshProgressDidChange(_ note: Notification) {
|
||||
@@ -530,7 +537,7 @@ extension MainWindowController: NSWindowDelegate {
|
||||
}
|
||||
|
||||
func window(_ window: NSWindow, didDecodeRestorableState coder: NSCoder) {
|
||||
guard let state = try? coder.decodeTopLevelObject(forKey: UserInfoKey.windowState) as? [AnyHashable : Any] else { return }
|
||||
guard let state = coder.decodeObject(of: MainWindowState.self, forKey: UserInfoKey.windowState) else { return }
|
||||
restoreState(from: state)
|
||||
}
|
||||
|
||||
@@ -949,34 +956,67 @@ private extension MainWindowController {
|
||||
|
||||
// MARK: - State Restoration
|
||||
|
||||
func savableState() -> [AnyHashable : Any] {
|
||||
var state = [AnyHashable : Any]()
|
||||
state[UserInfoKey.windowFullScreenState] = window?.styleMask.contains(.fullScreen) ?? false
|
||||
saveSplitViewState(to: &state)
|
||||
sidebarViewController?.saveState(to: &state)
|
||||
timelineContainerViewController?.saveState(to: &state)
|
||||
detailViewController?.saveState(to: &state)
|
||||
return state
|
||||
func savableState() -> MainWindowState {
|
||||
let isFullScreen = window?.styleMask.contains(.fullScreen) ?? false
|
||||
|
||||
let splitViewWidths: [Int]
|
||||
if let splitView = splitViewController?.splitView {
|
||||
splitViewWidths = splitView.arrangedSubviews.map{ Int(floor($0.frame.width)) }
|
||||
} else {
|
||||
splitViewWidths = []
|
||||
}
|
||||
|
||||
let isSidebarHidden = sidebarSplitViewItem?.isCollapsed ?? false
|
||||
|
||||
return MainWindowState(isFullScreen: isFullScreen,
|
||||
splitViewWidths: splitViewWidths,
|
||||
isSidebarHidden: isSidebarHidden,
|
||||
sidebarWindowState: sidebarViewController?.windowState,
|
||||
timelineWindowState: timelineContainerViewController?.windowState,
|
||||
detailWindowState: detailViewController?.windowState)
|
||||
}
|
||||
|
||||
func restoreState(from state: [AnyHashable : Any]) {
|
||||
if let fullScreen = state[UserInfoKey.windowFullScreenState] as? Bool, fullScreen {
|
||||
func restoreState(from state: MainWindowState) {
|
||||
if state.isFullScreen {
|
||||
window?.toggleFullScreen(self)
|
||||
}
|
||||
restoreSplitViewState(from: state)
|
||||
|
||||
sidebarViewController?.restoreState(from: state)
|
||||
sidebarViewController?.restoreState(from: state.sidebarWindowState)
|
||||
|
||||
timelineContainerViewController?.restoreState(from: state.timelineWindowState)
|
||||
restoreArticleWindowScrollY = state.detailWindowState?.windowScrollY
|
||||
|
||||
let isShowingExtractedArticle = state.detailWindowState?.isShowingExtractedArticle ?? false
|
||||
if isShowingExtractedArticle {
|
||||
startArticleExtractorForCurrentLink()
|
||||
}
|
||||
}
|
||||
|
||||
/// Restore state using pre-secure-state-restoration data.
|
||||
///
|
||||
/// It’s up to the caller to call this only when:
|
||||
/// 1. Legacy state exists, and
|
||||
/// 2. Secure state data does not exist.
|
||||
///
|
||||
/// TODO: delete this for NetNewsWire 7.
|
||||
func restoreLegacyState(from state: [AnyHashable: Any]) {
|
||||
if let fullScreen = state[UserInfoKey.windowFullScreenState] as? Bool, fullScreen {
|
||||
window?.toggleFullScreen(self)
|
||||
}
|
||||
restoreLegacySplitViewState(from: state)
|
||||
|
||||
sidebarViewController?.restoreLegacyState(from: state)
|
||||
|
||||
let articleWindowScrollY = state[UserInfoKey.articleWindowScrollY] as? CGFloat
|
||||
restoreArticleWindowScrollY = articleWindowScrollY
|
||||
timelineContainerViewController?.restoreState(from: state)
|
||||
|
||||
timelineContainerViewController?.restoreLegacyState(from: state)
|
||||
|
||||
let isShowingExtractedArticle = state[UserInfoKey.isShowingExtractedArticle] as? Bool ?? false
|
||||
if isShowingExtractedArticle {
|
||||
restoreArticleWindowScrollY = articleWindowScrollY
|
||||
startArticleExtractorForCurrentLink()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: - Command Validation
|
||||
@@ -1237,23 +1277,40 @@ private extension MainWindowController {
|
||||
}
|
||||
}
|
||||
|
||||
func saveSplitViewState(to state: inout [AnyHashable : Any]) {
|
||||
guard let splitView = splitViewController?.splitView else {
|
||||
func restoreSplitViewState(from state: MainWindowState) {
|
||||
guard let splitView = splitViewController?.splitView,
|
||||
state.splitViewWidths.count == 3,
|
||||
let window = window else {
|
||||
return
|
||||
}
|
||||
|
||||
let widths = splitView.arrangedSubviews.map{ Int(floor($0.frame.width)) }
|
||||
state[MainWindowController.mainWindowWidthsStateKey] = widths
|
||||
|
||||
state[UserInfoKey.isSidebarHidden] = sidebarSplitViewItem?.isCollapsed
|
||||
let windowWidth = Int(floor(window.frame.width))
|
||||
let dividerThickness: Int = Int(splitView.dividerThickness)
|
||||
let sidebarWidth: Int = state.splitViewWidths[0]
|
||||
let timelineWidth: Int = state.splitViewWidths[1]
|
||||
|
||||
// Make sure the detail view has its minimum thickness, at least.
|
||||
if windowWidth < sidebarWidth + dividerThickness + timelineWidth + dividerThickness + MainWindowController.detailViewMinimumThickness {
|
||||
return
|
||||
}
|
||||
|
||||
splitView.setPosition(CGFloat(sidebarWidth), ofDividerAt: 0)
|
||||
splitView.setPosition(CGFloat(sidebarWidth + dividerThickness + timelineWidth), ofDividerAt: 1)
|
||||
|
||||
Task { @MainActor in
|
||||
sidebarSplitViewItem?.isCollapsed = state.isSidebarHidden
|
||||
}
|
||||
}
|
||||
|
||||
func restoreSplitViewState(from state: [AnyHashable : Any]) {
|
||||
/// Restore main window split view using legacy state restoration data.
|
||||
///
|
||||
/// TODO: Delete this for NetNewsWire 7.
|
||||
func restoreLegacySplitViewState(from state: [AnyHashable: Any]) {
|
||||
guard let splitView = splitViewController?.splitView,
|
||||
let widths = state[MainWindowController.mainWindowWidthsStateKey] as? [Int],
|
||||
widths.count == 3,
|
||||
let window = window else {
|
||||
return
|
||||
let widths = state[MainWindowController.mainWindowWidthsStateKey] as? [Int],
|
||||
widths.count == 3,
|
||||
let window = window else {
|
||||
return
|
||||
}
|
||||
|
||||
let windowWidth = Int(floor(window.frame.width))
|
||||
@@ -1268,9 +1325,9 @@ private extension MainWindowController {
|
||||
|
||||
splitView.setPosition(CGFloat(sidebarWidth), ofDividerAt: 0)
|
||||
splitView.setPosition(CGFloat(sidebarWidth + dividerThickness + timelineWidth), ofDividerAt: 1)
|
||||
|
||||
|
||||
let isSidebarHidden = state[UserInfoKey.isSidebarHidden] as? Bool ?? false
|
||||
|
||||
|
||||
if !(sidebarSplitViewItem?.isCollapsed ?? false) && isSidebarHidden {
|
||||
sidebarSplitViewItem?.isCollapsed = true
|
||||
}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
//
|
||||
// MainWindowState.swift
|
||||
// NetNewsWire
|
||||
//
|
||||
// Created by Maurice Parker on 12/16/23.
|
||||
// Copyright © 2023 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
final class MainWindowState: NSObject, NSSecureCoding {
|
||||
|
||||
static let supportsSecureCoding = true
|
||||
|
||||
let isFullScreen: Bool
|
||||
let splitViewWidths: [Int]
|
||||
let isSidebarHidden: Bool
|
||||
let sidebarWindowState: SidebarWindowState?
|
||||
let timelineWindowState: TimelineWindowState?
|
||||
let detailWindowState: DetailWindowState?
|
||||
|
||||
init(isFullScreen: Bool, splitViewWidths: [Int], isSidebarHidden: Bool, sidebarWindowState: SidebarWindowState? = nil, timelineWindowState: TimelineWindowState? = nil, detailWindowState: DetailWindowState? = nil) {
|
||||
self.isFullScreen = isFullScreen
|
||||
self.splitViewWidths = splitViewWidths
|
||||
self.isSidebarHidden = isSidebarHidden
|
||||
self.sidebarWindowState = sidebarWindowState
|
||||
self.timelineWindowState = timelineWindowState
|
||||
self.detailWindowState = detailWindowState
|
||||
}
|
||||
|
||||
private struct Key {
|
||||
static let isFullScreen = "isFullScreen"
|
||||
static let splitViewWidths = "splitViewWidths"
|
||||
static let isSidebarHidden = "isSidebarHidden"
|
||||
static let sidebarWindowState = "sidebarWindowState"
|
||||
static let timelineWindowState = "timelineWindowState"
|
||||
static let detailWindowState = "detailWindowState"
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
isFullScreen = coder.decodeBool(forKey: Key.isFullScreen)
|
||||
splitViewWidths = coder.decodeObject(of: [NSArray.self, NSNumber.self], forKey: Key.splitViewWidths) as? [Int] ?? []
|
||||
isSidebarHidden = coder.decodeBool(forKey: Key.isSidebarHidden)
|
||||
sidebarWindowState = coder.decodeObject(of: SidebarWindowState.self, forKey: Key.sidebarWindowState)
|
||||
timelineWindowState = coder.decodeObject(of: TimelineWindowState.self, forKey: Key.timelineWindowState)
|
||||
detailWindowState = coder.decodeObject(of: DetailWindowState.self, forKey: Key.detailWindowState)
|
||||
}
|
||||
|
||||
func encode(with coder: NSCoder) {
|
||||
coder.encode(isFullScreen, forKey: Key.isFullScreen)
|
||||
coder.encode(splitViewWidths, forKey: Key.splitViewWidths)
|
||||
coder.encode(isSidebarHidden, forKey: Key.isSidebarHidden)
|
||||
coder.encode(sidebarWindowState, forKey: Key.sidebarWindowState)
|
||||
coder.encode(timelineWindowState, forKey: Key.timelineWindowState)
|
||||
coder.encode(detailWindowState, forKey: Key.detailWindowState)
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,12 @@ protocol SidebarDelegate: AnyObject {
|
||||
|
||||
weak var splitViewItem: NSSplitViewItem?
|
||||
|
||||
var windowState: SidebarWindowState {
|
||||
let expandedContainers = expandedTable.compactMap { $0.userInfo as? [String: String] }
|
||||
let selectedFeeds = selectedFeeds.compactMap { $0.feedID?.userInfo as? [String: String] }
|
||||
return SidebarWindowState(isReadFiltered: isReadFiltered, expandedContainers: expandedContainers, selectedFeeds: selectedFeeds)
|
||||
}
|
||||
|
||||
private let rebuildTreeAndRestoreSelectionQueue = CoalescingQueue(name: "Rebuild Tree Queue", interval: 1.0)
|
||||
let treeControllerDelegate = WebFeedTreeControllerDelegate()
|
||||
lazy var treeController: TreeController = {
|
||||
@@ -96,14 +102,39 @@ protocol SidebarDelegate: AnyObject {
|
||||
|
||||
// MARK: State Restoration
|
||||
|
||||
func saveState(to state: inout [AnyHashable : Any]) {
|
||||
state[UserInfoKey.readFeedsFilterState] = isReadFiltered
|
||||
state[UserInfoKey.containerExpandedWindowState] = expandedTable.map { $0.userInfo }
|
||||
state[UserInfoKey.selectedFeedsState] = selectedFeeds.compactMap { $0.feedID?.userInfo }
|
||||
}
|
||||
|
||||
func restoreState(from state: [AnyHashable : Any]) {
|
||||
func restoreState(from state: SidebarWindowState?) {
|
||||
guard let state else { return }
|
||||
|
||||
let containerIdentifers = state.expandedContainers.compactMap( { ContainerIdentifier(userInfo: $0) })
|
||||
expandedTable = Set(containerIdentifers)
|
||||
|
||||
let selectedFeedIdentifers = Set(state.selectedFeeds.compactMap( { FeedIdentifier(userInfo: $0) }))
|
||||
selectedFeedIdentifers.forEach { treeControllerDelegate.addFilterException($0) }
|
||||
|
||||
rebuildTreeAndReloadDataIfNeeded()
|
||||
|
||||
var selectIndexes = IndexSet()
|
||||
|
||||
func selectFeedsVisitor(node: Node) {
|
||||
if let feedID = (node.representedObject as? FeedIdentifiable)?.feedID {
|
||||
if selectedFeedIdentifers.contains(feedID) {
|
||||
selectIndexes.insert(outlineView.row(forItem: node) )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
treeController.visitNodes(selectFeedsVisitor(node:))
|
||||
outlineView.selectRowIndexes(selectIndexes, byExtendingSelection: false)
|
||||
focus()
|
||||
|
||||
isReadFiltered = state.isReadFiltered
|
||||
}
|
||||
|
||||
/// Restore state using legacy state restoration data.
|
||||
///
|
||||
/// TODO: Delete for NetNewsWire 7.
|
||||
func restoreLegacyState(from state: [AnyHashable : Any]) {
|
||||
|
||||
if let containerExpandedWindowState = state[UserInfoKey.containerExpandedWindowState] as? [[AnyHashable: AnyHashable]] {
|
||||
let containerIdentifiers = containerExpandedWindowState.compactMap( { ContainerIdentifier(userInfo: $0) })
|
||||
expandedTable = Set(containerIdentifiers)
|
||||
@@ -115,9 +146,9 @@ protocol SidebarDelegate: AnyObject {
|
||||
|
||||
let selectedFeedIdentifiers = Set(selectedFeedsState.compactMap( { FeedIdentifier(userInfo: $0) }))
|
||||
selectedFeedIdentifiers.forEach { treeControllerDelegate.addFilterException($0) }
|
||||
|
||||
|
||||
rebuildTreeAndReloadDataIfNeeded()
|
||||
|
||||
|
||||
var selectIndexes = IndexSet()
|
||||
|
||||
func selectFeedsVisitor(node: Node) {
|
||||
@@ -131,12 +162,12 @@ protocol SidebarDelegate: AnyObject {
|
||||
treeController.visitNodes(selectFeedsVisitor(node:))
|
||||
outlineView.selectRowIndexes(selectIndexes, byExtendingSelection: false)
|
||||
focus()
|
||||
|
||||
|
||||
if let readFeedsFilterState = state[UserInfoKey.readFeedsFilterState] as? Bool {
|
||||
isReadFiltered = readFeedsFilterState
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Notifications
|
||||
|
||||
@objc func unreadCountDidInitialize(_ notification: Notification) {
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// SidebarWindowState.swift
|
||||
// NetNewsWire
|
||||
//
|
||||
// Created by Maurice Parker on 12/16/23.
|
||||
// Copyright © 2023 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
final class SidebarWindowState: NSObject, NSSecureCoding {
|
||||
|
||||
static let supportsSecureCoding = true
|
||||
|
||||
let isReadFiltered: Bool
|
||||
let expandedContainers: [[String: String]]
|
||||
let selectedFeeds: [[String: String]]
|
||||
|
||||
init(isReadFiltered: Bool, expandedContainers: [[String : String]], selectedFeeds: [[String : String]]) {
|
||||
self.isReadFiltered = isReadFiltered
|
||||
self.expandedContainers = expandedContainers
|
||||
self.selectedFeeds = selectedFeeds
|
||||
}
|
||||
|
||||
private struct Key {
|
||||
static let isReadFiltered = "isReadFiltered"
|
||||
static let expandedContainers = "expandedContainers"
|
||||
static let selectedFeeds = "selectedFeeds"
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
isReadFiltered = coder.decodeBool(forKey: Key.isReadFiltered)
|
||||
expandedContainers = coder.decodeObject(of: [NSArray.self, NSDictionary.self, NSString.self], forKey: Key.expandedContainers) as? [[String: String]] ?? []
|
||||
selectedFeeds = coder.decodeObject(of: [NSArray.self, NSDictionary.self, NSString.self], forKey: Key.selectedFeeds) as? [[String: String]] ?? []
|
||||
}
|
||||
|
||||
func encode(with coder: NSCoder) {
|
||||
coder.encode(isReadFiltered, forKey: Key.isReadFiltered)
|
||||
coder.encode(expandedContainers, forKey: Key.expandedContainers)
|
||||
coder.encode(selectedFeeds, forKey: Key.selectedFeeds)
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,10 @@ final class TimelineContainerViewController: NSViewController {
|
||||
view?.window?.recalculateKeyViewLoop()
|
||||
}
|
||||
}
|
||||
|
||||
var windowState: TimelineWindowState? {
|
||||
return currentTimelineViewController?.windowState
|
||||
}
|
||||
|
||||
weak var delegate: TimelineContainerViewControllerDelegate?
|
||||
|
||||
@@ -127,14 +131,20 @@ final class TimelineContainerViewController: NSViewController {
|
||||
|
||||
// MARK: State Restoration
|
||||
|
||||
func saveState(to state: inout [AnyHashable : Any]) {
|
||||
regularTimelineViewController.saveState(to: &state)
|
||||
}
|
||||
|
||||
func restoreState(from state: [AnyHashable : Any]) {
|
||||
func restoreState(from state: TimelineWindowState?) {
|
||||
guard let state else { return }
|
||||
|
||||
regularTimelineViewController.restoreState(from: state)
|
||||
updateReadFilterButton()
|
||||
}
|
||||
|
||||
/// Restore state using legacy state restoration data.
|
||||
///
|
||||
/// TODO: Delete for NetNewsWire 7.
|
||||
func restoreLegacyState(from state: [AnyHashable: Any]) {
|
||||
regularTimelineViewController.restoreLegacyState(from: state)
|
||||
updateReadFilterButton()
|
||||
}
|
||||
}
|
||||
|
||||
extension TimelineContainerViewController: TimelineDelegate {
|
||||
|
||||
@@ -80,6 +80,24 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
|
||||
}
|
||||
}
|
||||
|
||||
var windowState: TimelineWindowState {
|
||||
let readArticlesFilterStateKeys = readFilterEnabledTable.keys.compactMap { $0.userInfo as? [String: String] }
|
||||
let readArticlesFilterStateValues = readFilterEnabledTable.values.compactMap( { $0 })
|
||||
|
||||
if selectedArticles.count == 1 {
|
||||
let path = selectedArticles.first!.pathUserInfo
|
||||
return TimelineWindowState(readArticlesFilterStateKeys: readArticlesFilterStateKeys,
|
||||
readArticlesFilterStateValues: readArticlesFilterStateValues,
|
||||
selectedAccountID: path[ArticlePathKey.accountID] as? String,
|
||||
selectedArticleID: path[ArticlePathKey.articleID] as? String)
|
||||
} else {
|
||||
return TimelineWindowState(readArticlesFilterStateKeys: readArticlesFilterStateKeys,
|
||||
readArticlesFilterStateValues: readArticlesFilterStateValues,
|
||||
selectedAccountID: nil,
|
||||
selectedArticleID: nil)
|
||||
}
|
||||
|
||||
}
|
||||
weak var delegate: TimelineDelegate?
|
||||
var sharingServiceDelegate: NSSharingServiceDelegate?
|
||||
|
||||
@@ -271,16 +289,36 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
|
||||
|
||||
// MARK: State Restoration
|
||||
|
||||
func saveState(to state: inout [AnyHashable : Any]) {
|
||||
state[UserInfoKey.readArticlesFilterStateKeys] = readFilterEnabledTable.keys.compactMap { $0.userInfo }
|
||||
state[UserInfoKey.readArticlesFilterStateValues] = readFilterEnabledTable.values.compactMap( { $0 })
|
||||
func restoreState(from state: TimelineWindowState) {
|
||||
for i in 0..<state.readArticlesFilterStateKeys.count {
|
||||
if let feedIdentifier = FeedIdentifier(userInfo: state.readArticlesFilterStateKeys[i]) {
|
||||
readFilterEnabledTable[feedIdentifier] = state.readArticlesFilterStateValues[i]
|
||||
}
|
||||
}
|
||||
|
||||
if selectedArticles.count == 1 {
|
||||
state[UserInfoKey.articlePath] = selectedArticles.first!.pathUserInfo
|
||||
if let selectedAccountID = state.selectedAccountID,
|
||||
let account = AccountManager.shared.existingAccount(with: selectedAccountID),
|
||||
let selectedArticleID = state.selectedArticleID {
|
||||
|
||||
exceptionArticleFetcher = SingleArticleFetcher(account: account, articleID: selectedArticleID)
|
||||
fetchAndReplaceArticlesSync()
|
||||
|
||||
if let selectedIndex = articles.firstIndex(where: { $0.articleID == selectedArticleID }) {
|
||||
tableView.selectRow(selectedIndex)
|
||||
DispatchQueue.main.async {
|
||||
self.tableView.scrollTo(row: selectedIndex)
|
||||
}
|
||||
focus()
|
||||
}
|
||||
} else {
|
||||
fetchAndReplaceArticlesSync()
|
||||
}
|
||||
}
|
||||
|
||||
func restoreState(from state: [AnyHashable : Any]) {
|
||||
|
||||
/// Restore state using legacy state restoration data.
|
||||
///
|
||||
/// TODO: Delete for NetNewsWire 7.
|
||||
func restoreLegacyState(from state: [AnyHashable: Any]) {
|
||||
guard let readArticlesFilterStateKeys = state[UserInfoKey.readArticlesFilterStateKeys] as? [[AnyHashable: AnyHashable]],
|
||||
let readArticlesFilterStateValues = state[UserInfoKey.readArticlesFilterStateValues] as? [Bool] else {
|
||||
return
|
||||
@@ -291,15 +329,15 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
|
||||
readFilterEnabledTable[feedIdentifier] = readArticlesFilterStateValues[i]
|
||||
}
|
||||
}
|
||||
|
||||
if let articlePathUserInfo = state[UserInfoKey.articlePath] as? [AnyHashable : Any],
|
||||
|
||||
if let articlePathUserInfo = state[UserInfoKey.articlePath] as? [AnyHashable: Any],
|
||||
let accountID = articlePathUserInfo[ArticlePathKey.accountID] as? String,
|
||||
let account = AccountManager.shared.existingAccount(with: accountID),
|
||||
let articleID = articlePathUserInfo[ArticlePathKey.articleID] as? String {
|
||||
|
||||
|
||||
exceptionArticleFetcher = SingleArticleFetcher(account: account, articleID: articleID)
|
||||
fetchAndReplaceArticlesSync()
|
||||
|
||||
|
||||
if let selectedIndex = articles.firstIndex(where: { $0.articleID == articleID }) {
|
||||
tableView.selectRow(selectedIndex)
|
||||
DispatchQueue.main.async {
|
||||
@@ -307,15 +345,12 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
|
||||
}
|
||||
focus()
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
fetchAndReplaceArticlesSync()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// MARK: - Actions
|
||||
|
||||
@objc func openArticleInBrowser(_ sender: Any?) {
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
//
|
||||
// TimelineWindowState.swift
|
||||
// NetNewsWire
|
||||
//
|
||||
// Created by Maurice Parker on 12/16/23.
|
||||
// Copyright © 2023 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
final class TimelineWindowState: NSObject, NSSecureCoding {
|
||||
|
||||
static let supportsSecureCoding = true
|
||||
|
||||
let readArticlesFilterStateKeys: [[String: String]]
|
||||
let readArticlesFilterStateValues: [Bool]
|
||||
let selectedAccountID: String?
|
||||
let selectedArticleID: String?
|
||||
|
||||
init(readArticlesFilterStateKeys: [[String : String]], readArticlesFilterStateValues: [Bool], selectedAccountID: String? = nil, selectedArticleID: String? = nil) {
|
||||
self.readArticlesFilterStateKeys = readArticlesFilterStateKeys
|
||||
self.readArticlesFilterStateValues = readArticlesFilterStateValues
|
||||
self.selectedAccountID = selectedAccountID
|
||||
self.selectedArticleID = selectedArticleID
|
||||
}
|
||||
|
||||
private struct Key {
|
||||
static let readArticlesFilterStateKeys = "readArticlesFilterStateKeys"
|
||||
static let readArticlesFilterStateValues = "readArticlesFilterStateValues"
|
||||
static let selectedAccountID = "selectedAccountID"
|
||||
static let selectedArticleID = "selectedArticleID"
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
readArticlesFilterStateKeys = coder.decodeObject(of: [NSArray.self, NSDictionary.self, NSString.self], forKey: Key.readArticlesFilterStateKeys) as? [[String: String]] ?? []
|
||||
readArticlesFilterStateValues = coder.decodeObject(of: [NSArray.self, NSNumber.self], forKey: Key.readArticlesFilterStateValues) as? [Bool] ?? []
|
||||
selectedAccountID = coder.decodeObject(of: NSString.self, forKey: Key.selectedAccountID) as? String
|
||||
selectedArticleID = coder.decodeObject(of: NSString.self, forKey: Key.selectedArticleID) as? String
|
||||
}
|
||||
|
||||
func encode(with coder: NSCoder) {
|
||||
coder.encode(readArticlesFilterStateKeys, forKey: Key.readArticlesFilterStateKeys)
|
||||
coder.encode(readArticlesFilterStateValues, forKey: Key.readArticlesFilterStateValues)
|
||||
coder.encode(selectedAccountID, forKey: Key.selectedAccountID)
|
||||
coder.encode(selectedArticleID, forKey: Key.selectedArticleID)
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ final class FeedlyAccountDelegate: AccountDelegate {
|
||||
|
||||
/// Feedly has a sandbox API and a production API.
|
||||
/// This property is referred to when clients need to know which environment it should be pointing to.
|
||||
/// The value of this proptery must match any `OAuthAuthorizationClient` used.
|
||||
/// The value of this property must match any `OAuthAuthorizationClient` used.
|
||||
/// Currently this is always returning the cloud API, but we are leaving it stubbed out for now.
|
||||
static var environment: FeedlyAPICaller.API {
|
||||
return .cloud
|
||||
|
||||
@@ -195,7 +195,7 @@ public extension String {
|
||||
/// - `>` matches the literal `>` character.
|
||||
/// - `[\\s\\S]*?`
|
||||
/// - `[\\s\\S]` matches _any_ character, including new lines.
|
||||
/// - `*` will match zero or more of the preceeding character, in this case _any_
|
||||
/// - `*` will match zero or more of the preceding character, in this case _any_
|
||||
/// character.
|
||||
/// - `?` switches the matching mode to [lazy](https://javascript.info/regexp-greedy-and-lazy)
|
||||
/// so it will match as few as characters as possible before satisfying the rest of the pattern.
|
||||
|
||||
@@ -240,7 +240,7 @@ class MainThreadOperationTests: XCTestCase {
|
||||
|
||||
func run() {
|
||||
guard let block = didStartRunBlock else {
|
||||
XCTFail("Unable to test cancelation of running operation.")
|
||||
XCTFail("Unable to test cancellation of running operation.")
|
||||
return
|
||||
}
|
||||
block()
|
||||
|
||||
@@ -24,7 +24,7 @@ struct UserInfoKey {
|
||||
static let readArticlesFilterStateValues = "readArticlesFilterStateValue"
|
||||
static let selectedFeedsState = "selectedFeedsState"
|
||||
static let isShowingExtractedArticle = "isShowingExtractedArticle"
|
||||
|
||||
static let articleWindowScrollY = "articleWindowScrollY"
|
||||
static let isSidebarHidden = "isSidebarHidden"
|
||||
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
# Mac State Restoration
|
||||
|
||||
https://github.com/Ranchero-Software/NetNewsWire/issues/4589
|
||||
|
||||
https://github.com/Ranchero-Software/NetNewsWire/issues/4631
|
||||
|
||||
## State to restore
|
||||
|
||||
Hide Read Articles
|
||||
Hide Read Feeds
|
||||
Windows positions, including split view positions
|
||||
|
||||
## Warnings
|
||||
|
||||
WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
|
||||
|
||||
## How state restoration works according to Apple
|
||||
|
||||
Info.plist: NSApplicationSupportsRestorableState - true
|
||||
|
||||
NSUserInterfaceItemIdentification
|
||||
|
||||
NSWindowRestoration Protocol
|
||||
window.restorationClass = …
|
||||
|
||||
encodeRestorableStateWithCoder:
|
||||
restoreStateWithCoder:
|
||||
|
||||
self.restorationIdentifier = "MainWindowController"
|
||||
|
||||
AppDelegate — application:shouldRestoreApplicationState: and application:shouldSaveApplicationState: for complex cases
|
||||
|
||||
Can be turned on and off via system pref
|
||||
|
||||
## Tests
|
||||
|
||||
Window 1
|
||||
Restore position — yes
|
||||
Restore split view position — sometimes
|
||||
Restore timeline position — no
|
||||
Restore Hide Read Feeds — yes
|
||||
Restore Hide Read Articles for inessential — yes
|
||||
|
||||
Window 2
|
||||
Restore position
|
||||
Restore split view position
|
||||
Restore Hide Read Feeds
|
||||
Restore Hide Read Articles for The Verge
|
||||
|
||||
Restores second window but not first
|
||||
|
||||
With state restoration enabled, all three windows appear, but with not everything restored
|
||||
|
||||
---
|
||||
|
||||
Close windows tests
|
||||
|
||||
1 window
|
||||
detail scroll not restored
|
||||
@@ -0,0 +1,57 @@
|
||||
# How To Do Mac Sparkle Release
|
||||
|
||||
NetNewsWire_mac_target_common.xcconfig
|
||||
update MARKETING_VERSION and CURRENT_PROJECT_VERSION
|
||||
|
||||
ReleaseNotes-Mac.markdown
|
||||
main branch
|
||||
Write change notes in notes
|
||||
Include branch and tag
|
||||
|
||||
Run buildscripts/quiet_build_and_test.sh
|
||||
|
||||
Make sure there are no outstanding changes
|
||||
|
||||
Archive build
|
||||
Developer ID distribution - notarize
|
||||
Wait while processing
|
||||
|
||||
Export
|
||||
Smoke test
|
||||
|
||||
On main: update Technotes/Status.md
|
||||
commit
|
||||
|
||||
Tag the app:
|
||||
git tag mac-6.1.5b4
|
||||
|
||||
Push:
|
||||
git push origin mac-6.1.5b4
|
||||
|
||||
Find tag in GitHub - https://github.com/Ranchero-Software/NetNewsWire/tags
|
||||
Turn into release — NetNewsWire 6.1.5b4 for Mac
|
||||
Add change notes
|
||||
Zip app - NetNewsWire6.1.5b4.zip
|
||||
Upload binary to release
|
||||
Publish release
|
||||
Copy file to releases archive — iCloud Drive/Archive/Releases/
|
||||
|
||||
Update Appcast on main branch
|
||||
Add changes
|
||||
Update title
|
||||
Update pubDate
|
||||
Update enclosure URL
|
||||
Update version
|
||||
Update file size - length
|
||||
|
||||
Run xmllint on appcast
|
||||
xmllint --noout netnewswire-beta.xml
|
||||
|
||||
Upload appcast
|
||||
Commit and push git change
|
||||
|
||||
Test updating via appcast
|
||||
|
||||
Optionally:
|
||||
Announce on Slack
|
||||
Announce on blog
|
||||
@@ -0,0 +1,20 @@
|
||||
# How To Do App Store Release
|
||||
|
||||
Update release notes in ReleaseNotes-iOS.markdown on main to say that the TestFlight build has been submitted to App Store
|
||||
Commit release notes
|
||||
|
||||
Click + near iOS App
|
||||
Type in new version name (example: 6.1.10)
|
||||
Scroll halfway down to Build section, click + button, and choose the build (latest TestFlight build, presumably)
|
||||
Fill in What’s New text
|
||||
Click Save at top of screen
|
||||
Click Add for Review next to Save
|
||||
|
||||
On next screen, click Submit to App Review
|
||||
|
||||
Once it appears on App Store…
|
||||
|
||||
Optionally…
|
||||
Announce on Slack
|
||||
Announce on NetNewsWire blog
|
||||
Announce on inessential
|
||||
@@ -0,0 +1,74 @@
|
||||
# How To Do iOS TestFlight Release
|
||||
|
||||
Be sure to have updated code and be *on correct branch*
|
||||
|
||||
## Edit Build Version
|
||||
|
||||
NetNewsWire_ios_target_common.xcconfig
|
||||
|
||||
Possibly bump MARKETING_VERSION
|
||||
Increment CURRENT_PROJECT_VERSION by 1 (usually)
|
||||
|
||||
Commit change.
|
||||
|
||||
## Test
|
||||
|
||||
Run buildscripts/quiet_build_and_test.sh to be sure all platforms build and tests pass.
|
||||
|
||||
Build and run app on device
|
||||
|
||||
Smoke test
|
||||
If it fails, bail.
|
||||
Check in and push changes.
|
||||
|
||||
## Create Release Notes
|
||||
|
||||
On main:
|
||||
|
||||
ReleaseNotes-iOS.markdown
|
||||
|
||||
Go to milestone and find closed bugs since last release notes
|
||||
Add to iOS Release Notes note
|
||||
|
||||
Write release notes
|
||||
|
||||
Commit change.
|
||||
|
||||
## Archive and Upload
|
||||
|
||||
Archive
|
||||
Distribute to TestFlight
|
||||
|
||||
## Status
|
||||
|
||||
Update NetNewsWire Status doc in Technotes
|
||||
Commit
|
||||
|
||||
## Tag
|
||||
|
||||
On branch (or on main, if working on main):
|
||||
|
||||
Use SemVer with tags
|
||||
Tag the app: git tag iOS-6.1.5-6124
|
||||
Push: git push origin iOS-6.1.5-6124
|
||||
|
||||
## Release the app
|
||||
|
||||
In AppStoreConnect add groups and release the app
|
||||
Paste in the release notes
|
||||
Announce in Slack
|
||||
Optionally blog about it
|
||||
|
||||
## GitHub release
|
||||
|
||||
Make new release from tag
|
||||
|
||||
https://github.com/Ranchero-Software/NetNewsWire/tags
|
||||
|
||||
Example title:
|
||||
NetNewsWire 6.1.6 (6140) for iOS - TestFlight
|
||||
|
||||
## Notes
|
||||
|
||||
Public TestFlight link:
|
||||
https://testflight.apple.com/join/wpedPMRR
|
||||
@@ -1,5 +1,13 @@
|
||||
# Mac Release Notes
|
||||
|
||||
### 6.1.10b4 build 6139 16 Aug 2025 - branch main tag: mac-6.1.10b4
|
||||
|
||||
Adopt secure state restoration; fix bug with state restoration not working in previous betas.
|
||||
|
||||
### 6.1.10b3 build 6138 11 Aug 2025 - branch main tag: mac-6.1.10b3
|
||||
|
||||
Fixed bug, introduced in previous test build, that prevented choosing an OPML file to import
|
||||
|
||||
### 6.1.10b2 build 6137 13 May 2025 - branch main tag: mac-6.1.10b2
|
||||
|
||||
Fixed bug, introduced in previous test build, that prevented adding a Feedly account
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# iOS Release Notes
|
||||
|
||||
### 6.1.10 TestFlight build 6198 11 Aug 2025 - branch: main tag iOS-6.1.10-6198
|
||||
### 6.1.10 TestFlight build 6198 11 Aug 2025 - branch: main tag iOS-6.1.10-6198 — submitted as App Store release build 18 Aug 2025
|
||||
|
||||
Replaced BBC in default feeds (for new users) because its feeds have gone wonky. Replaced with Scripting News.
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# NetNewsWire Status
|
||||
|
||||
Current milestone: NetNewsWire 6.1.10
|
||||
https://github.com/Ranchero-Software/NetNewsWire/milestone/60
|
||||
|
||||
Current bug: TBD
|
||||
|
||||
Stuart working on Liquid Glass UI for NetNewsWire 7
|
||||
|
||||
## iOS
|
||||
|
||||
iOS shipping: 6.1.9 (6197)
|
||||
|
||||
TestFlight: 6.1.10 (6198)
|
||||
https://github.com/Ranchero-Software/NetNewsWire/releases/tag/iOS-6.1.10-6198
|
||||
|
||||
## Mac
|
||||
|
||||
Mac shipping: 6.1.9
|
||||
|
||||
Beta: 6.1.10b4
|
||||
https://github.com/Ranchero-Software/NetNewsWire/releases/tag/mac-6.1.10b4
|
||||
@@ -1,6 +1,6 @@
|
||||
// High Level Settings common to both the Mac application and any extensions we bundle with it
|
||||
MARKETING_VERSION = 6.1.10b2
|
||||
CURRENT_PROJECT_VERSION = 6137
|
||||
MARKETING_VERSION = 6.1.10b4
|
||||
CURRENT_PROJECT_VERSION = 6139
|
||||
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
|
||||
|
||||
Reference in new issue
Block a user