Skip to content

feat(#279): restore mark as read/unread for news posts#290

Merged
cassio-rossi merged 5 commits into
release/v5from
feature/mark-as-read
Apr 30, 2026
Merged

feat(#279): restore mark as read/unread for news posts#290
cassio-rossi merged 5 commits into
release/v5from
feature/mark-as-read

Conversation

@cassio-rossi
Copy link
Copy Markdown
Collaborator

Summary

Restores the read/unread post tracking feature that users reported missing. Minimal implementation — no widget badge, no counter, just the visual indicator and toggle action.

What's back:

  • News cards show at 0.6 opacity when read
  • Highlight carousel cards also show read state
  • Context menu includes "Marcar como lido" / "Marcar como não lido" button
  • Posts are auto-marked as read when opened (already existed)
  • Read state syncs via iCloud (uses existing FeedDB.read property)

What's intentionally excluded:

  • Badge counter on app icon
  • "Mark all as read" bulk action
  • Settings toggle for "identify read posts"
  • Widget unread count

Changes:

  • CardContent — added read: Bool and readAction: (() -> Void)? (both optional with defaults for backward compat)
  • MenuContent — added read/unread toggle button (only shown when readAction is provided)
  • NewsCard — opacity modifier based on data.read
  • FeedHighlightCardView — opacity modifier based on post.read
  • FeedDBExtensions — passes read state and toggle closure

Closes #279

Test plan

  • Open a news article → go back → card should appear dimmed (0.6 opacity)
  • Long-press/context menu on a read card → shows "Marcar como não lido"
  • Tap "Marcar como não lido" → card returns to full opacity
  • Long-press unread card → shows "Marcar como lido"
  • Highlight carousel cards also dim when read
  • Podcast/video cards don't show read option in menu
  • All tests pass ✅ (466 tests across 10 suites)

🤖 Generated with Claude Code

cassiorossi1010 and others added 5 commits April 30, 2026 17:26
Brings back the read/unread post tracking UI:
- Add `read` and `readAction` to CardContent model
- Add "Marcar como lido/não lido" button to card context menu
- Apply 0.6 opacity to read posts on news cards and highlights
- FeedDB.read is toggled via context menu and auto-set on article open
- No widget badge or counter (intentionally excluded)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ttings

Restores ModelReadable protocol in MacMagazineLibrary so SettingsLibrary
can mark all posts as read without importing FeedLibrary directly.
Follows the same pattern as ModelFavoritable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mirrors existing ModelFavoritable test coverage pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Shows "Todos os posts marcados como lido" alert with OK button
after the mark-all-as-read action completes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Adds postRead setting back to SettingsDB
- Creates ReadingPreferencesView with toggle + mark-all-as-read button
- Moves reading preferences from About into Aparência screen
- Adds highlightPostRead environment value for NewsCard/Highlights
- Opacity now respects user preference via @Environment(\.highlightPostRead)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cassio-rossi cassio-rossi merged commit 8065ded into release/v5 Apr 30, 2026
2 checks passed
@cassio-rossi cassio-rossi deleted the feature/mark-as-read branch April 30, 2026 20:54
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.

Reavaliar trazer de volta o recurso de posts lidos

2 participants