Skip to content

feat: add option to hide duplicate articles within the same feed - #1330

Open
nethbotheju wants to merge 1 commit into
ReadYouApp:mainfrom
nethbotheju:feat/hide-duplicate-articles
Open

nethbotheju wants to merge 1 commit into
ReadYouApp:mainfrom
nethbotheju:feat/hide-duplicate-articles

Conversation

@nethbotheju

@nethbotheju nethbotheju commented Sep 19, 2026 •

Copy link
Copy Markdown

Problem

Some feeds publish the same article multiple times (same title, slightly different
timestamp/link), which clutters the article list, the unread view, and the unread
badge counts.

Changes

Adds a new setting Settings → Usage → Article list → "Hide duplicate articles"
(default off). When enabled, an article is hidden if an earlier article with the
same title exists in the same feed — the oldest copy is always the one kept.

Applied consistently to:

  • Article lists: feed view, group view, and the account-wide flow (Unread + All)
  • In-app search results (Unread + All)
  • Unread/All badge counts on the Feeds page, so the numbers match the visible list

Design decisions

  • Scoped per feed: identical titles from different feeds are both kept —
    two outlets reporting the same story is not a duplicate.
  • Keep the oldest: strictly the earliest article wins, so marking the visible
    copy as read does not resurface a newer unread duplicate in the Unread view.
  • SQL-level filtering (NOT EXISTS subquery in the DAO queries) rather than
    Kotlin-side filtering, so deduplication stays correct across Paging page
    boundaries, and the same clause keeps badge counts consistent.
  • Starred lists are untouched — those are explicitly curated by the user.
  • Exact title match; empty titles never deduplicate; ties on date break by article id.
  • Display-only: nothing is deleted and there is no schema change/migration;
    toggling off restores the full list immediately.
  • The pager and badge jobs react to the toggle without needing to re-enter the screen.

Testing

  • New unit tests for the preference (default off, stored value, fallback).
  • Full existing unit test suite passes (testGithubDebugUnitTest).
  • Built the github release APK from CI and tested on a physical device:
    duplicates collapse to the oldest entry in feed/group/unread views, badge counts
    match, cross-feed same-title articles both remain, starred view unaffected,
    toggling off restores everything.

Screenshots

Toggle in Settings Before After
Settings Before After

- hide same-title articles in feed, group, and search lists, always keeping the oldest copy
- apply the same dedup to unread/all badge counts so numbers match the visible list
- add a Usage setting (off by default) that instantly refreshes lists and badges when toggled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant