diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-07-22 16:26:45 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-07-22 16:26:45 +0000 |
| commit | 52d7877fccd60a1dae33d877ba6aa765dc098a52 (patch) | |
| tree | dd23bf9c42fd59dfb475759d8de969216e7b49e0 /app/src/main/java/org/terst/feedreader/ui/AddFeedScreen.kt | |
| parent | 2c04d2dbef2e36025a4b795291117ad208fba411 (diff) | |
First round of testing feedback: images, unread landing, dark, delete
- Fix OPML import status message reporting the raw pre-dedup count
(144) instead of the actual unique feed count after Room's upsert
collapses duplicates (108) -- cosmetic bug, the DB was already
correct.
- Article thumbnails: extract media:thumbnail/enclosure or the first
<img> in feed content, show via Coil in the article list.
- App now lands on Unread instead of the feed list; a top-bar icon
gets from there to the feed list (forward nav, not back-stack pop,
since Unread is now the root).
- Dark color scheme by default.
- Delete-feed action (with confirmation) on each feed row -- was
entirely missing. Deletes its non-saved articles too, so they don't
linger as orphaned rows in the cross-feed Unread view; saved articles
are kept regardless.
- Room migration 1->2 for the new imageUrl column (real migration, not
destructive fallback, since there's now real on-device subscription
data from testing).
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/AddFeedScreen.kt')
| -rw-r--r-- | app/src/main/java/org/terst/feedreader/ui/AddFeedScreen.kt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/src/main/java/org/terst/feedreader/ui/AddFeedScreen.kt b/app/src/main/java/org/terst/feedreader/ui/AddFeedScreen.kt index 1e053af..5d19c90 100644 --- a/app/src/main/java/org/terst/feedreader/ui/AddFeedScreen.kt +++ b/app/src/main/java/org/terst/feedreader/ui/AddFeedScreen.kt @@ -57,11 +57,16 @@ fun AddFeedScreen(onDone: () -> Unit) { val imported = withContext(Dispatchers.IO) { context.contentResolver.openInputStream(uri)?.use { stream -> Opml.parse(stream) } ?: emptyList() } - for (feed in imported) { + // A feed cross-listed under multiple OPML category folders (common when + // exported from a reader with folders/labels) appears once per folder here -- + // dedupe by feed URL before reporting a count, or "108 feeds" would be reported + // as some larger number even though upsert already collapses them to one row each. + val uniqueFeeds = imported.distinctBy { it.xmlUrl } + for (feed in uniqueFeeds) { db.feedDao().upsert(FeedEntity(id = feed.xmlUrl, title = feed.title, siteUrl = feed.htmlUrl)) } FeedFetchWorker.fetchNow(context) - status = "Imported ${imported.size} feed(s)" + status = "Imported ${uniqueFeeds.size} feed(s)" isBusy = false } } |
