mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
b0cc940776
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.