fix(dreamyTranslations): Hide locked chapters setting not working - #2569
Conversation
|
| 'This chapter requires premium access and cannot be read here. ' + | ||
| 'You can enable "Hide locked chapters" in the plugin settings to filter out locked chapters.', |
There was a problem hiding this comment.
Misleading advice for cached chapters When a locked chapter is already cached in a reader’s library, this error can still appear after they enable the setting. LNReader retains chapters that disappear from the plugin’s response, so the suggested toggle will not remove that chapter. Please qualify the advice for existing library entries.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Checklist
type(scope): description(e.g.feat(<generator>): add new source)Closes #2494
Summary
Adds a "Hide locked chapters" toggle to the Dreamy Translations plugin.
When enabled, chapters marked as premium/locked are filtered out of the
chapter list returned by
parseNovel. The setting is read from LNReader'sstorageAPI at runtime.Changes
hideLockedfromstorageinsideparseNovel(not frompluginSettings.value) anymore lolfree === falsewhen the setting is on1.1.0→1.1.1Known Limitation
Due to LNReader's current behavior of retaining chapters that disappear
from a plugin's response (see #1352), enabling the toggle will not remove
already-cached locked chapters for novels already in the library.
Workaround for Users
Delete the novel from the library and re-add it (or clear the app's data) so
parseNovelruns against a fresh chapter list.That method didnt' work for me but I did tested like this
But when we restore the backup especially if you are testing agaist the novel that you've read, it kinda doesn't work. It is related to #1352, maybe you can experiment with backup options.
And please don't turn setting off if you wnat to continue reading with hide chapter setting on, for example
You click a new fresh novel A that you have never clicked before -> toggle on -> it works
Toggle off -> check same novel -> it works but
Toggle on again -> check the same novel -> it doesn't work now, bc LNReader's chapter DB never deletes chapters that disappear from a plugin's response