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:
15
Jarvis/Views/Shared/ShareSheet.swift
Normal file
15
Jarvis/Views/Shared/ShareSheet.swift
Normal file
@@ -0,0 +1,15 @@
|
||||
// ShareSheet.swift
|
||||
// Jarvis — thin wrapper around UIActivityViewController for the share action.
|
||||
|
||||
import SwiftUI
|
||||
import UIKit
|
||||
|
||||
struct ShareSheet: UIViewControllerRepresentable {
|
||||
let items: [Any]
|
||||
|
||||
func makeUIViewController(context: Context) -> UIActivityViewController {
|
||||
UIActivityViewController(activityItems: items, applicationActivities: nil)
|
||||
}
|
||||
|
||||
func updateUIViewController(_ controller: UIActivityViewController, context: Context) {}
|
||||
}
|
||||
Reference in New Issue
Block a user