You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
koreader/plugins/autosuspend.koplugin
NiLuJe b0cc940776 AutoSuspend: Unbreak scheduling & settings across instances
Plugins are loaded *once*, but torn-down/instantiated multiple times,
and sometimes in the reverse order.

As such, if we use a public function member as the scheduled task, we're
always pointing to the same function, and going from FM to RD
effectively *un*schedules it.

Instead, use an instance-specific closure, so that each instance
schedules & unschedules don't affect each other.

In the same vein, settings ought to be read at instantiation, not at
loading, otherwise, changing a setting in the FM, then switching to the
reader will not pick up the changes.
3 years ago
..
_meta.lua Actually set sorting hints in plugins (#6770) 4 years ago
main.lua AutoSuspend: Unbreak scheduling & settings across instances 3 years ago