mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
kobolight(refactor): move into plugin & only enable for kobo
This commit is contained in:
@@ -100,6 +100,7 @@ function ReaderUI:init()
|
||||
self.doc_settings = DocSettings:open(self.document.file)
|
||||
|
||||
-- a view container (so it must be child #1!)
|
||||
-- all paintable widgets need to be a child of reader view
|
||||
self:registerModule("view", ReaderView:new{
|
||||
dialog = self.dialog,
|
||||
dimen = self.dimen,
|
||||
@@ -317,15 +318,6 @@ function ReaderUI:init()
|
||||
})
|
||||
end
|
||||
|
||||
local ReaderKoboLight = require("apps/reader/modules/readerkobolight")
|
||||
if (Device:isKobo() and Device:hasFrontlight()) then
|
||||
self:registerModule('kobolight', ReaderKoboLight:new{
|
||||
dialog = self.dialog,
|
||||
view = self.view,
|
||||
ui = self,
|
||||
})
|
||||
end
|
||||
|
||||
-- we only read settings after all the widgets are initialized
|
||||
self:handleEvent(Event:new("ReadSettings", self.doc_settings))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user