diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-07-24 03:28:31 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-07-24 03:28:31 +0000 |
| commit | 72f76cc41ae406e00a4dd9d448e2b552f9a6baaa (patch) | |
| tree | 5f23e410b2ac4f8dddf89422ab57e738b3b04b2f /app/src/main/java/org/terst/feedreader/ui/MainActivity.kt | |
| parent | ab392e2ab983a4c87e241b457c98244251b2206a (diff) | |
Collapsible folders, long-press link menu, YouTube thumbnails, strip more Ars sequel chrome
- Feed list: folders now collapse (start collapsed, with a per-folder unread
count so collapsing doesn't hide "is there anything new")
- Long-pressing a link inside an article shows an action menu (open in
browser, share, save to Stash, save for later) instead of WebView's
default text-selection popup -- confirmed live end to end, including the
Stash/save-for-later paths creating a real standalone article
- New shared ensureStandaloneArticle() helper (data/ArticleSaving.kt),
factored out of ShareReceiverActivity, now also used by the long-press menu
- YouTube iframe embeds become tap-to-open thumbnails (JS is off in the
reader WebView, so the real player never worked anyway); tapping one goes
straight to the YouTube app/browser instead of our own article-extraction
pipeline
- Fixed back navigation through a chain of links-within-links: each hop was
stacking a new backstack entry, so back stepped through the chain one link
at a time instead of returning straight to the source article. Confirmed
live: A -> link -> B -> link -> C, one back-press now goes straight to A
- Extended the <header> chrome-stripping from last round: also strip
<footer>, an author bio card, and a "Most Read" trending-stories widget --
confirmed live one of the latter showed up as a giant unrelated photo plus
an empty numbered list (its lazy-loaded items never populate in this
hidden, off-screen extraction WebView)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZ7ikw2ukGJFTHE3bJS7zL
Diffstat (limited to 'app/src/main/java/org/terst/feedreader/ui/MainActivity.kt')
| -rw-r--r-- | app/src/main/java/org/terst/feedreader/ui/MainActivity.kt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/src/main/java/org/terst/feedreader/ui/MainActivity.kt b/app/src/main/java/org/terst/feedreader/ui/MainActivity.kt index 0d17ab8..f7ca043 100644 --- a/app/src/main/java/org/terst/feedreader/ui/MainActivity.kt +++ b/app/src/main/java/org/terst/feedreader/ui/MainActivity.kt @@ -108,7 +108,16 @@ fun FeedReaderApp() { LinkReaderScreen( url = url, onBack = { navController.popBackStack() }, - onOpenLink = { nextUrl -> navController.navigate("linkReader/${encodeNavArg(nextUrl)}") }, + // Replaces the current linkReader entry rather than stacking another one on + // top -- otherwise a chain of links-within-links (A -> link -> B -> link -> C) + // made back step through the chain one hop at a time (C -> B -> A) instead of + // returning straight to the source article A, which is what "back" actually + // means here: leaving the link-reading detour, not undoing it one link at a time. + onOpenLink = { nextUrl -> + navController.navigate("linkReader/${encodeNavArg(nextUrl)}") { + popUpTo("linkReader/{url}") { inclusive = true } + } + }, onOpenBrowser = { browserUrl -> navController.navigate("browser/${encodeNavArg(browserUrl)}") } ) } |
