mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
Move PluginShare.backgroundJobs into PluginShare module (#3128)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
-- PluginShare is a table for plugins to exchange data between each other. Plugins should maintain
|
||||
-- their own protocols.
|
||||
return {}
|
||||
return {
|
||||
backgroundJobs = {},
|
||||
}
|
||||
|
||||
@@ -22,8 +22,6 @@ local AutoFrontlight = {
|
||||
last_brightness = -1,
|
||||
}
|
||||
|
||||
PluginShare.backgroundJobs = PluginShare.backgroundJobs or {}
|
||||
|
||||
function AutoFrontlight:_schedule(settings_id)
|
||||
local enabled = function()
|
||||
if not self.enabled then
|
||||
|
||||
@@ -64,8 +64,6 @@ local logger = require("logger")
|
||||
-- end_sec: number, the os.time() when the job was stopped.
|
||||
-- insert_sec: number, the os.time() when the job was inserted into queue.
|
||||
|
||||
PluginShare.backgroundJobs = PluginShare.backgroundJobs or {}
|
||||
|
||||
local BackgroundRunner = {
|
||||
jobs = PluginShare.backgroundJobs,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user