Open LukeMurphey opened 2 years ago
The verse to highlight gets set correctly, but then set to null in loadChapter(). The fetch sets it again to null because it isn't returning a verse_to_highlight.
Is the correct URL being called with the verse to highlight set?
Why is the resolved reference not being used?
loadChapter()
is losing the highlighted verse. This is being called in useEffect()
What is the lifecycle of the reference to loading the page for a typed reference?
ReadingMenuBar
: accepts key presses and checks the server to see if the reference is validReadingMenuBar
: if the user presses "enter", the reference is checked in checkAndGoToReference()
and Reader::goToReference()
is called to go to the new pageReader::goToReference()
accepts the request to go to a new reference and calls navigateToChapter()
which calls updateHistory()
to modify the URL and load the new pathShould the URL include the verse?
Can I fix this by having reference checking use the full URL?
What are the cases I need to test?
referenceInfo.verse_to_highlight
to the navigateToChapter()
call in goToReference()
fixes it: if(referenceInfo.verse_to_highlight) {
updateHistory(requestedWork, secondWork, ...referenceInfo.divisions, referenceInfo.verse_to_highlight);
}
else {
updateHistory(requestedWork, secondWork, ...referenceInfo.divisions);
}
Here is the problem:
goToReference()
calls updateHistory()
but provides no way for the selected verse to be persisted.
It appears to remember the prior verse but doesn't update based on the updated verse number.