mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Add menu item for toggling auto_book_status (#3642)
This commit is contained in:
@@ -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