From 91edd1f5f29a3336fa9e3bd1762c70ea74e3e48d Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Wed, 22 Jul 2026 18:26:14 +0000 Subject: Split save/Stash actions, follow links in-app via reader pipeline, tune scroll, fix title entities - ReaderScreen: bookmark icon is now a purely local save (just flips isSaved, no network) -- Stash archiving is a separate explicit action (new cloud icon), since it's a heavier networked action the user should trigger on purpose rather than have bundled into "save." Verified via direct DB queries and (once I stopped misreading small screenshots) the icon updates immediately in-session for both actions. - New ReaderWebView.kt: shared WebView factory for the dark reader palette and link handling, used by both ReaderScreen and the new LinkReaderScreen. Links tapped inside an article's WebView now open in a lightweight in-app reader (extracted via the same Readability pipeline, no DB persistence) instead of falling through to the system browser -- recursive, so a chain of links stays in-app. Verified live: tapping a link mid-article navigated to a real extracted page with a working back stack. - WebView scroll tuning: overscroll glow and scrollbars off, on both the article reader and the new link reader -- aimed at the reported "still a little choppy" scrolling on top of the previous reload-on-recompose fix. - FeedParser: some feeds (kottke.org among them) double-encode titles -- the XML parser resolves outer XML escaping, but leftover HTML entities like "“" were showing up literally in the title text. Titles are now run through a second HTML-entity decode pass. Verified: a kottke title that previously showed a literal “ now renders the actual curly quote. All changes verified live on the emulator against the real 107-feed dataset. --- .../java/org/terst/feedreader/ui/MainActivity.kt | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'app/src/main/java/org/terst/feedreader/ui/MainActivity.kt') 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 e1300f0..95ef71e 100644 --- a/app/src/main/java/org/terst/feedreader/ui/MainActivity.kt +++ b/app/src/main/java/org/terst/feedreader/ui/MainActivity.kt @@ -81,7 +81,25 @@ fun FeedReaderApp() { val articleId = decodeNavArg(backStackEntry.arguments?.getString("articleId") ?: "") // feedId here is the list the article was opened from (Unread/Saved/a specific // feed) -- ReaderScreen uses it to build the swipe queue of sibling articles. - ReaderScreen(feedId = feedId, initialArticleId = articleId, onBack = { navController.popBackStack() }) + ReaderScreen( + feedId = feedId, + initialArticleId = articleId, + onBack = { navController.popBackStack() }, + onOpenLink = { url -> navController.navigate("linkReader/${encodeNavArg(url)}") } + ) + } + composable( + "linkReader/{url}", + arguments = listOf(navArgument("url") { type = NavType.StringType }) + ) { backStackEntry -> + val url = decodeNavArg(backStackEntry.arguments?.getString("url") ?: "") + // Recursive: a link tapped inside this screen pushes another linkReader route, + // so following a chain of links stays inside the reader pipeline all the way down. + LinkReaderScreen( + url = url, + onBack = { navController.popBackStack() }, + onOpenLink = { nextUrl -> navController.navigate("linkReader/${encodeNavArg(nextUrl)}") } + ) } composable("addFeed") { AddFeedScreen(onDone = { navController.popBackStack() }) -- cgit v1.2.3