PluginLoader: Allow querying whether a specific plugin is loaded (#7607)

* PluginLoader: Allow querying whether a specific plugin is loaded (instantiated, actually).

Re #7598

* PluginLoader: Add a method to access a specific Plugin's instance
(Besides `self.ui[plugin_name]`, that is).

Requires some nastiness to avoid pinning stale references in memory :s.

* PluginLoader:  Tweak genPluginManagerSubItem to keep from rebuilding `self.all_plugins`, it's using `loadPlugins`, which is cached, so it made no sense to re-compute this one.
This commit is contained in:
NiLuJe
2021-04-29 19:30:18 +02:00
committed by GitHub
parent 22da527ff5
commit 9f835156d1
3 changed files with 40 additions and 15 deletions

View File

@@ -699,6 +699,7 @@ end
function ReaderUI:onClose(full_refresh)
logger.dbg("closing reader")
PluginLoader:finalize()
Device:notifyBookState(nil, nil)
if full_refresh == nil then
full_refresh = true