Skip to content

feat(notifications): optional single summary notification + launcher badge - #1335

Open
j-fuentes wants to merge 1 commit into
ReadYouApp:mainfrom
j-fuentes:pr/notification-summary-badge
Open

j-fuentes wants to merge 1 commit into
ReadYouApp:mainfrom
j-fuentes:pr/notification-summary-badge

Conversation

@j-fuentes

@j-fuentes j-fuentes commented Oct 18, 2026 •

Copy link
Copy Markdown

What

Adds an opt-in mode that groups every new article found during a sync into one notification, plus an optional launcher icon badge with the count.

Today, with several feeds that have "Allow notifications" on, a single background sync can post dozens of notifications (one group per feed + one per article). This keeps that behaviour as the default and adds a quieter alternative.

How

  • NotificationHelper buffers new articles while a sync runs (instead of notifying immediately) when the summary mode is on.
  • SyncWorker calls notificationHelper.flushSummary() at the end of each sync, which posts a single InboxStyle notification:
    • title: "N new articles" (plural resource)
    • lines: feed · title, up to 8, then "and N more"
    • tapping opens the app
  • Launcher badge: setNumber(count) + BADGE_ICON_SMALL on a channel with showBadge = true. Launchers that support numeric badges show the count, the rest show a dot.
  • New preferences (DataStore + CompositionLocal, same pattern as the existing ones):
    • notificationSummary — default off, so nothing changes for existing users
    • notificationBadge — default on, only effective when summary is on
  • UI: Settings → Usage → new "Notifications" section with both switches.
  • Still respects the per-feed "Allow notifications" flag and the account sync interval / Wi-Fi / charging constraints; no new workers.

Notes

  • Only English strings added; translations can go through Weblate.
  • Built with ./gradlew assembleGithubRelease, unit tests and lint pass (CI on my fork).
  • Manually tested on a device: summary notification with count + list after sync, and the launcher badge.

Happy to adjust naming, placement of the settings or defaults.

Disclosure

This code was vibe-coded with an AI assistant. I have reviewed it and tested it manually myself on a device.

…badge

Adds an opt-in mode that groups every new article found during a sync
into a single notification instead of one notification per article.

- NotificationHelper buffers new articles while a sync runs; SyncWorker
  flushes them at the end into one InboxStyle notification showing the
  count and a list of 'feed · title' (up to 8 lines + 'and N more')
- Launcher icon badge via setNumber() / BADGE_ICON_SMALL on a channel
  with showBadge enabled (numeric on launchers that support it, dot
  otherwise)
- New preferences notificationSummary (default off, keeps current
  behaviour) and notificationBadge, under Settings > Usage >
  Notifications
- Respects the existing per-feed 'Allow notifications' flag and the
  account sync interval
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