mirror of
https://github.com/chmouel/liseur.git
synced 2026-10-19 17:25:10 +00:00
* fix(reader): save where a scrolled book has got to A locator names a place; it does not carry a distance. Readium's `firstVisibleElementLocator` answers with a selector and the words at the top of the screen and nothing else — no progression, no position — and `BookPositions.resolve` reads a locator with neither as the start of its resource. Auto-scroll is the one path that asks that question directly, because Readium's own hundred-millisecond debounce never lands on a page that never stops. So every save it made filed the reader at the top of the chapter they were half way down: the footer, the pace estimator, and the number calibre-web syncs outright and Komga and liseur-sync compare when they disagree. Only local resume escaped it, the anchor saved beside the number still being exact. Measure the distance too. `ScrollProgression` reads the document's own scroll offset over its own length, which is not an approximation of Readium's convention but the inverse of it: `scrollToPosition` restores a fraction by multiplying it back out against the same span. A page that cannot give one saves nothing that tick — a place a line behind is worth having, a place a chapter behind is not. The same round trip now keeps a place for a manually scrolled book. Its debounce does land, but it lands after `ReaderActivity` has marked the reader inactive if they leave the moment they stop scrolling, and is dropped as movement nobody made. The web view's own scroll offset is watched instead — a field read every couple of seconds — and the document asked only once it has moved. One `HeldPlace` is shared between the two loops. A measurement takes several round trips into a document the reader is still moving through, so it is held against a mark taken before the asking began, and the first answer to land is the one that stands. A locator Readium announces invalidates the ones in flight but does not clear what is held until its own capture has been taken — that capture suspends, and clearing early would leave a reader who left mid-capture with neither. * fix(reader): do not save a place from a collector already stood down |
||
|---|---|---|
| .. | ||
| 0001-advanced-reading-menu.md | ||
| 0002-typography-fine-tuning.md | ||
| 0003-read-aloud-tts.md | ||
| 0004-user-imported-fonts.md | ||
| 0005-warm-light.md | ||
| 0006-auto-scroll.md | ||
| 0007-scrubber-page-peek.md | ||
| 0008-highlight-styles.md | ||
| 0009-tap-zone-customization.md | ||
| 0010-translation-on-selection.md | ||
| 0011-annotation-sync.md | ||