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.
reviewable/pr6260/r1
NiLuJe 4 years ago committed by GitHub
parent 23ab5750c3
commit e3f978be2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save