Add swipe actions: left to save, right to share + mark read

- Swipe left bookmarks a story (toggle) into the Saved tab; swipe right opens
  the iOS share sheet and marks the story read.
- New SavedStory SwiftData model; Saved tab now lists explicit bookmarks
  instead of the whole offline cache.
- Convert the feed to a styled List (native swipeActions require it), keeping
  the flat look, pull-to-refresh, and infinite scroll. Add a ShareSheet wrapper.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Robin Kutesa
2026-06-19 01:15:56 +03:00
parent 87bfb234c2
commit 3fd5b8f1c7
5 changed files with 127 additions and 25 deletions

View File

@@ -199,6 +199,17 @@ final class ReadStory {
}
}
@Model
final class SavedStory {
@Attribute(.unique) var id: String
var savedAt: Date
init(id: String) {
self.id = id
self.savedAt = Date()
}
}
@Model
final class CachedArticle {
@Attribute(.unique) var id: String