BookStatusWidget: fix status toggle (#8329)

Fix:  #8324

cf: #7671
pull/8333/head
yparitcher 2 years ago committed by GitHub
parent a1e0d87c62
commit 1c2e5eee1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -249,9 +249,8 @@ end
-- If mark_read is true then we change status only from reading/abandoned to read (complete).
-- Otherwise we change status from reading/abandoned to read or from read to reading.
function ReaderStatus:onMarkBook(mark_read)
if self.settings.data.summary and self.settings.data.summary.status then
local current_status = self.settings.data.summary.status
if current_status == "complete" then
if self.settings.data.summary then
if self.settings.data.summary.status and self.settings.data.summary.status == "complete" then
if mark_read then
-- Keep mark as read.
self.settings.data.summary.status = "complete"

@ -572,7 +572,7 @@ function BookStatusWidget:generateSwitchGroup(width)
}
end
function BookStatusWidget:onConfigChoose(values, name, event, args, events, position)
function BookStatusWidget:onConfigChoose(values, name, event, args, position)
UIManager:tickAfterNext(function()
if values then
self:onChangeBookStatus(args, position)

Loading…
Cancel
Save