Browse Source

Move PluginShare.backgroundJobs into PluginShare module (#3128)

pull/3129/head
Hzj_jie 4 years ago
committed by Frans de Jonge
parent
commit
b89435b432
3 changed files with 3 additions and 5 deletions
  1. +3
    -1
      frontend/pluginshare.lua
  2. +0
    -2
      plugins/autofrontlight.koplugin/main.lua
  3. +0
    -2
      plugins/backgroundrunner.koplugin/main.lua

+ 3
- 1
frontend/pluginshare.lua View File

@ -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 = {},
}

+ 0
- 2
plugins/autofrontlight.koplugin/main.lua View File

@ -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

+ 0
- 2
plugins/backgroundrunner.koplugin/main.lua View File

@ -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,
}

Loading…
Cancel
Save