diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-08-22 01:02:31 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-08-22 01:02:31 +0000 |
| commit | 5c7f9d0d306b66740642cf4111f2a9ee26897ac5 (patch) | |
| tree | 55f218b5660d9976f045ba2f4d2bbf0c18234191 /gradle/wrapper | |
| parent | a3296f5c14a5fb95feaa3751044a1995935e6f3e (diff) | |
Fix reader rotation bug: replace-nav instead of a swipe-queue snapshot
The reader used to snapshot the article-id order of its list ONCE at
entry and page a HorizontalPager across that fixed queue. Two real
bugs traced back to one root cause: the snapshot lived in plain
remember state that did NOT survive an orientation change, while the
pager's own page index did -- rotating mid-session left the index
pointing into a freshly re-fetched (and by then shorter, since paging
past an article marks it read and drops it from the Unread query)
list, landing on a different article than the one actually being
read. Back was confusing for the same reason: it always returned to
wherever the ORIGINAL initialArticleId pointed, not wherever the pager
had since scrolled to.
Fixed by not having a separate queue/index at all: each Next/Previous
now replaces this screen's own back-stack entry with a fresh
navigation to the neighboring article's id (MainActivity wires
onNavigateToArticle with the same popUpTo-replace pattern
LinkReaderScreen already uses for its own link chain). "Which article
is showing" is now the nav route argument itself -- Android's own
Saved State mechanism, not custom state that can drift out of sync
with it -- and the back stack is always exactly [list, one reader
entry] no matter how many articles were paged through.
Diffstat (limited to 'gradle/wrapper')
0 files changed, 0 insertions, 0 deletions
