summaryrefslogtreecommitdiff
path: root/app/src/main/java/org/terst/feedreader/data/Entities.kt
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-07-22 16:54:03 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-07-22 16:54:03 +0000
commit39cca1cb3650edb066f57d0891b1873b767b1c43 (patch)
tree0a966be07f4d4440cfad0f4eeb8bffd1617f3ea0 /app/src/main/java/org/terst/feedreader/data/Entities.kt
parent52d7877fccd60a1dae33d877ba6aa765dc098a52 (diff)
Fix Unread/startup crash; add reader-mode toggle and swipe navigation
- Root cause of the reported crashes: observeUnread/observeByFeed/ observeSaved used SELECT *, pulling feedContentHtml/extractedContent (potentially large per-article blobs) just to render a list row. With 107 feeds worth of real articles this blows past Android's CursorWindow/memory limits, scaling with item count -- and since Unread is now the landing screen, it crashed at startup too. Added an ArticleListItem projection excluding the heavy content columns; list queries now only select what a row actually renders. - FilterRuleEngine now takes a small Titled interface (title/feedId) instead of the full entity, so it works with both ArticleEntity and the new lighter projection. - Reader-mode toggle: a button in the reader to manually switch between feed-provided content and Readability-extracted full text, matching Inoreader's full-text-view toggle (previously only an automatic fallback when feed content was thin). - Swipe between articles: ReaderScreen now wraps a HorizontalPager over a snapshot of the current list's article-id order, so swiping moves to the next/previous article. Snapshotted rather than live, since marking an article read would otherwise drop it from the live Unread query mid-swipe and shift every later page underneath the user. 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/data/Entities.kt')
-rw-r--r--app/src/main/java/org/terst/feedreader/data/Entities.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/org/terst/feedreader/data/Entities.kt b/app/src/main/java/org/terst/feedreader/data/Entities.kt
index 190340c..29d4fe4 100644
--- a/app/src/main/java/org/terst/feedreader/data/Entities.kt
+++ b/app/src/main/java/org/terst/feedreader/data/Entities.kt
@@ -18,8 +18,8 @@ data class FeedEntity(
@Entity(tableName = "articles")
data class ArticleEntity(
@PrimaryKey val id: String, // guid if the feed provides one, else a hash of the link
- @ColumnInfo(index = true) val feedId: String?, // null for a standalone article saved via the share-sheet target, not tied to any feed
- val title: String,
+ @ColumnInfo(index = true) override val feedId: String?, // null for a standalone article saved via the share-sheet target, not tied to any feed
+ override val title: String,
val link: String,
val author: String? = null,
val publishedAt: Long? = null,
@@ -30,7 +30,7 @@ data class ArticleEntity(
val isSaved: Boolean = false, // explicitly kept (independent of read state) -- triggers a Stash save
val stashArtifactId: String? = null, // set once successfully archived to Stash; null means not yet saved or save failed
val createdAt: Long
-)
+) : Titled
enum class FilterAction { MUTE, HIGHLIGHT }