Add menu item for toggling auto_book_status (#3642)
This commit is contained in:
1 parent
43a6cf4b2e
commit
9d44930960
4 files changed
+46
-32
No files matched your search
@@ -23,12 +23,6 @@ function ReaderStatus:init()
|
||||
else
|
||||
self.total_pages = self.document:getPageCount()
|
||||
self.ui.menu:registerToMainMenu(self)
|
||||
-- register event listener if enabled
|
||||
if G_reader_settings:nilOrTrue("auto_book_status") then
|
||||
self.onEndOfBook = function()
|
||||
self:showStatus()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -41,6 +35,12 @@ function ReaderStatus:addToMainMenu(menu_items)
|
||||
}
|
||||
end
|
||||
|
||||
function ReaderStatus:onEndOfBook()
|
||||
if G_reader_settings:nilOrTrue("auto_book_status") then
|
||||
self:showStatus()
|
||||
end
|
||||
end
|
||||
|
||||
function ReaderStatus:showStatus()
|
||||
local status_page = BookStatusWidget:new {
|
||||
thumbnail = self.document:getCoverPageImage(),
|
||||
|
||||
Reference in new issue
Block a user