Fixed last read not updating and bookmark button in reader mode. #1368
+29
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, the bookmark button in the reader top bar would always reset to whatever the status was when you first opened the chapter. Additionally, if you read part of a chapter or bookmarked a chapter, left reader mode, then pressed the "continue reading" button to get back to where you left off, the bookmark status and reading progress would not have been saved like if you opened the chapter via the list.
I tried to make the least intrusive changes I could, since the core problem with the "continue reading" bug is that state variables are not updated, and instead changes are directly saved to the database in other sections. The best solution would require rewriting a good section of the codebase.
If changes are necessary, please let me know.