Closed derungs closed 5 years ago
Makes sense (or rather, there's only a check for that in the filemanager). The entire workflow for saving advanced settings is pretty weird imho.
Rather than porting the weirdness to the reader I think it should just ask to save on closing the widget, or something along those lines.
I could move the "save/don't save" dialog to filemanagersetdefault
, and pass the "real" close function as a callback rather than the "save/don't save" dialog function.
That would to some degree unweird the save workflow.
Sounds good to me. :+1:
On it, the idea seems to work (once I fixed my rookie mistake with lambdas).
Here's me eating humble pie for saying "every sane exit workflow is wrapped in that check" just yesterday :D.
Hmm, pie! :cake:
Two questions:
ReaderMenu seems to use lfs without explicitly setting it. Do I miss something or should I just require lfs at the top of the file?
It's not a pure Lua module but a library, so it doesn't have any functional consequences. If you think it should be enforced as a code style then you can remove the exception from .luacheckrc
. The current situation is probably primarily a case of harmless legacy and less a case of purposeful consideration.
What does OTAManager do? It calls exitOrRestart, but I haven't discovered a way to trigger it.
OTA updates are only for embedded devices. On Android it merely starts the download of a newer package if available.
Issue
Modified advanced settings are not stored when you exit koreader from the reader, that is, from an open book. When you exit from the file manager, the save dialog pops up and the advanced settings are stored.
Steps to reproduce
Observed: The advanced setting has the old value. Expected: The advanced setting has the new value.