Satisfy FR #13163: Option to hide the "night mode changed" warning#13253
Conversation
Satisfies the koreader#13163 FR: Hide the AutoWarmth Plugin "Night Mode changed" popup forever koreader#13163
Use spaces because KOReader build does not seem to like tabs.
Frenzie
left a comment
There was a problem hiding this comment.
Fine by me (barring formatting).
Satisfying koreader#13253 (comment) request.
|
Fixed that, I'm not sure what formatting changes are requested but feel free to let me know and I'll work on it. |
|
I think you fixed it in the meantime. |
Change `isTrue()` not needing a default as requested, and also noticed `SaveSettings(_, true)` can use `makeTrue()` to make it a little more clear (it does the same thing but is nicer syntax).
|
Hi @ly-pa, I tested the recent changes you made to the AutoWarmth plugin. The new menu entry to hide the night mode warning appeared as expected, but after applying the change ("Hide this warning permanently"), the popup still showed up when opening a document. I tracked down the issue — the setting was being saved under the wrong key: G_reader_settings:makeTrue("hide_nightmode_warning")But the plugin reads the value from: G_reader_settings:isTrue("autowarmth_hide_nightmode_warning")Because of this mismatch, the setting was never actually applied. Changing the key in |
| text = _("Hide this warning permanently"), | ||
| provider = function() | ||
| self.hide_nightmode_warning = true | ||
| G_reader_settings:makeTrue("hide_nightmode_warning") |
There was a problem hiding this comment.
| G_reader_settings:makeTrue("hide_nightmode_warning") | |
| G_reader_settings:makeTrue("autowarmth_hide_nightmode_warning") |
| end, | ||
| callback = function() | ||
| self.hide_nightmode_warning = not self.hide_nightmode_warning | ||
| G_reader_settings:saveSetting("hide_nightmode_warning", self.hide_nightmode_warning) |
There was a problem hiding this comment.
| G_reader_settings:saveSetting("hide_nightmode_warning", self.hide_nightmode_warning) | |
| G_reader_settings:saveSetting("autowarmth_hide_nightmode_warning", self.hide_nightmode_warning) |
Resolves #13163 FR: Hide the AutoWarmth Plugin "Night Mode changed" popup forever.
It adds 3 simple things:
G_reader_settingscalled"hide_nightmode_warning".This change is