mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Allow automatically marking the book as read on end of doc (#6256)
Keep showing the "mark as" option/button, though, because that one is a toggle, it doesn't enforce the "read" status.
This commit is contained in:
@@ -54,6 +54,12 @@ function ReaderStatus:onEndOfBook()
|
||||
if G_reader_settings:readSetting("collate") == "access" then
|
||||
collate = false
|
||||
end
|
||||
|
||||
-- Should we start by marking the book as read?
|
||||
if G_reader_settings:isTrue("end_document_auto_mark") then
|
||||
self:onMarkBook(true)
|
||||
end
|
||||
|
||||
if settings == "pop-up" or settings == nil then
|
||||
local buttons = {
|
||||
{
|
||||
|
||||
@@ -465,6 +465,16 @@ common_settings.document = {
|
||||
{
|
||||
text = _("End of document action"),
|
||||
sub_item_table = {
|
||||
{
|
||||
text = _("Always mark as read"),
|
||||
checked_func = function()
|
||||
return G_reader_settings:isTrue("end_document_auto_mark")
|
||||
end,
|
||||
callback = function()
|
||||
G_reader_settings:flipNilOrFalse("end_document_auto_mark")
|
||||
end,
|
||||
separator = true,
|
||||
},
|
||||
{
|
||||
text = _("Ask with pop-up dialog"),
|
||||
checked_func = function()
|
||||
@@ -562,7 +572,7 @@ common_settings.document = {
|
||||
return G_reader_settings:isTrue("highlight_action_on_single_word")
|
||||
end,
|
||||
callback = function()
|
||||
G_reader_settings:flipNilOrFalse("highlight_action_on_single_word", nil)
|
||||
G_reader_settings:flipNilOrFalse("highlight_action_on_single_word")
|
||||
end,
|
||||
separator = true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user