-
Notifications
You must be signed in to change notification settings - Fork 219
Description
Description
When scrolling to the end of a Bible book (e.g. Ecclesiastes 12:14), the infinite scroll logic enters a busy loop where requestMoreToEnd returns null (no more chapters) but the Vue.js side keeps requesting more content indefinitely.
This causes:
- Main thread saturation from continuous JS bridge calls (~15ms per iteration)
- UI appearing frozen/hung, especially on slower devices
- Excessive battery drain
In the reported case, 1166 null responses were logged over 28 minutes on an Onyx Go103 e-ink reader.
Steps to reproduce
- Open any Bible book
- Navigate to the last chapter (e.g. Ecclesiastes 12)
- Scroll to the bottom of the chapter
- The app becomes unresponsive
Root cause
loadTextAtEnd() in infinite-scroll.ts calls itself recursively when needsMoreContent() returns true. The consecutiveEmptyLoads safety counter was local to processQueues() and reset on every recursive call, so the loop never terminated.
Fix
Added reachedEnd/reachedStart flags that persist across recursive calls and are reset on document change (passage navigation). Committed in d9ed120.
Device info
- App version: 5.0.915
- Device: Onyx Go103 (e-ink reader)
- Android: 12 (SDK 32)
OSTicket: https://support.andbible.org/scp/tickets.php?id=3177
Metadata
Metadata
Assignees
Labels
Type
Projects
Status