summaryrefslogtreecommitdiff
path: root/app/src/main/java/org/terst/feedreader/ui/MainActivity.kt
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-07-22 20:37:41 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-07-22 20:37:41 +0000
commit34b663c6e75a2c360de154418dafb8f616b546a1 (patch)
tree300f7b5a2344925832d13f634abe16470ce668ae /app/src/main/java/org/terst/feedreader/ui/MainActivity.kt
parentee019c91f66b6ba35b7295ea01220c6c13819b1c (diff)
Fix extraction regression on kottke; add Older view, mark-read-from-here
- ReaderExtractor: the un-hide-before-extracting fix (for soft paywalls like West Hawaii Today) was unconditional -- it also un-hid normal, legitimately-collapsed chrome (kottke's footer/membership notice), which Readability then folded into the result alongside the real article. Reported live with a screenshot showing the extracted content wrapped in site footer boilerplate. Now tries the normal (hidden-respecting) pass first and only falls back to the un-hide pass if that came back thin (<500 chars), keeping whichever pass actually found more text. Verified live: the same kottke article now stays clean and stable (no delayed switch to the footer version). - New Unread/Older split: the default Unread view is now clamped to the last 72 hours (RECENT_WINDOW_MS); the rest of the unread backlog moved to a new "Older" view (new FeedListScreen row, ArticleDao.observeUnread now takes a cutoff, observeOlderUnread/observeUnreadCount/ observeOlderUnreadCount added). Undated articles are kept in the main Unread view rather than silently dropped from both. Verified live: 150 recent / 1172 older, summing to the prior combined total. - "Mark read from here": long-press an article row to mark it and everything older in that same filtered list as read in one batch (re-added ArticleDao.markReadBatch, this time as an explicit, confirmed action -- not the implicit on-scroll version that was reverted earlier). Verified live: confirmed a 147-article batch: the tapped article and older were marked read, newer ones above it were not. - BACKLOG.md: added a YouTube-embeds note (JS is off in the reader WebView, so embeds currently show broken -- rough shape is a tap-to-play thumbnail rather than turning JS on for third-party content).
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.kt5
1 files changed, 5 insertions, 0 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 43e1680..0d17ab8 100644
--- a/app/src/main/java/org/terst/feedreader/ui/MainActivity.kt
+++ b/app/src/main/java/org/terst/feedreader/ui/MainActivity.kt
@@ -21,6 +21,10 @@ import java.net.URLEncoder
const val UNREAD_FEED_ID = "__unread__"
const val SAVED_FEED_ID = "__saved__"
+const val OLDER_FEED_ID = "__older__"
+
+// How far back the default Unread view reaches before an article falls into Older instead.
+const val RECENT_WINDOW_MS = 72L * 60 * 60 * 1000
fun encodeNavArg(value: String): String = URLEncoder.encode(value, "UTF-8")
fun decodeNavArg(value: String): String = URLDecoder.decode(value, "UTF-8")
@@ -55,6 +59,7 @@ fun FeedReaderApp() {
FeedListScreen(
onOpenFeed = { feedId -> navController.navigate("articles/${encodeNavArg(feedId)}") },
onOpenUnread = { navController.navigate("articles/${encodeNavArg(UNREAD_FEED_ID)}") },
+ onOpenOlder = { navController.navigate("articles/${encodeNavArg(OLDER_FEED_ID)}") },
onOpenSaved = { navController.navigate("articles/${encodeNavArg(SAVED_FEED_ID)}") },
onAddFeed = { navController.navigate("addFeed") },
onSettings = { navController.navigate("settings") }