Add global Hide Read Articles preference with per-feed overrides#5342
Open
brzzdev wants to merge 4 commits into
Open
Add global Hide Read Articles preference with per-feed overrides#5342brzzdev wants to merge 4 commits into
brzzdev wants to merge 4 commits into
Conversation
e986bd2 to
6f00356
Compare
- Encapsulate override toggle logic in AppDefaults helpers so both inspector view controllers wire the view with one-line closures. - Fix clearAll in FeedReadFilterOverridesView persisting N times by routing setOverride through the Toggle binding setter instead of .onChange, so programmatic resets no longer fire per-feed writes. - Prune an account's overrides on Mac when it is deleted, matching the cleanup iOS already performs on save. - Make the legacy migration path a static factory (FeedReadFilterOverrides.migrating(legacyFeedsHiding:)) to keep it off the type's general init surface. - Drop unused override wrapper methods on HidingReadArticlesState and trim narrative comments.
Adopt the cross-platform IconImageView favicon wrapper from Ranchero-Software#5095: each feed row shows its icon, refreshed on feedIconDidBecomeAvailable. Render rows with switches on both platforms (per the agreed design), title the screen "Global Overrides", and make the entry point consistent across platforms ("Hide Read Articles Settings…" on Mac, matching iOS). Fix macOS layout surfaced during manual testing: size the entry button to its label, and render the help text below the list because macOS clips List section footers to a single line.
…d filtering On macOS, per-feed hide-read state was double-backed by window-state restoration (readFilterEnabledTable) and the new feedReadFilterOverrides, with window state shadowing overrides. Legacy per-feed settings were therefore invisible to the Global Overrides screen, and were silently dropped the first time syncReadFilterTableFromDefaults ran after any override change. - Migrate legacy window-state feed entries into feedReadFilterOverrides on restore (no-clobber), so existing settings surface in the overrides screen and survive subsequent override changes. - Stop persisting feed entries to window state; folders and smart feeds remain window-state-backed. - Seed the shown feed's override into the in-memory fetch cache when a feed timeline opens, since feeds no longer come from window state.
6f00356 to
4ff1c16
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Adds a global Hide Read Articles preference that defaults every feed to
showing only unread articles, while preserving per-feed overrides. A new
Hide Read Articles Settings… entry on each account opens a Global
Overrides screen that lists every feed (favicon + name) with a switch; a
switch that is on means that feed keeps its own read-article visibility
instead of following the global preference, and Clear All resets them in
one step. Toggling hide-read in a timeline still sets that feed's own override
implicitly — it never changes the global preference. Works on macOS and iOS.
Screenshots
Why
Implements a long-requested global toggle (forum discussion + existing
repo issue). The per-account screen of switches is the minimal opt-out UI the
maintainers agreed on in the discussion, rather than scattering per-feed
controls through the app.
Deviations from the agreed design
This follows the design agreed in the discussion, with two deliberate
departures worth your eye:
Setting"; I shortened it to "Global Overrides" — the full string
overflows the iOS navigation bar and reads as redundant once you're already
inside the screen. Trivial to revert if you'd rather keep the original.
screen and the timeline agree on macOS, per-feed read-filter state now lives
in
feedReadFilterOverridesrather than window-state restoration — whichalso fixes a latent loss of pre-existing per-feed settings. Details below.
Things to look out for
was previously stored only in window-state restoration. This change makes
feedReadFilterOverrides(UserDefaults) authoritative for feeds: legacywindow-state feed entries are migrated into overrides on restore
(no-clobber), and feeds are no longer persisted to window state. Folders and
smart feeds remain window-state-backed. See
aba1d896b.feedsHidingReadArticlesUserDefaults dictionary; macOS migrates legacy window-state feed entries.
Both run once and never overwrite an existing override.
with hide-read having always been a local UI preference.
IconImageView) introduced in ✨Add Account-level Notification Management on iOS #5095.Related
Closes #3030
Test plan
semantics; timeline toggle sets a per-feed override only; Clear All;
persistence & state restoration; multi-account isolation
feedsHidingReadArticles→ overrides) verifiedthat previously hidden feeds survive a later override change
Note on tooling
Per the contributing guidelines: this PR was developed with the help of Claude Code. All changes were orchestrated and reviewed by me and manually tested on macOS and iOS.