ReaderStatus: update status modification time (#11568)

In the "End of the book" action.
Closes #11564 (No idea how we got a book without modification time but the time stamp must be updated in any case)
reviewable/pr11570/r1
hius07 1 month ago committed by GitHub
parent 424fa9b6fd
commit bb98cbf612
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -219,6 +219,7 @@ end
-- Otherwise we change status from reading/abandoned to complete or from complete to reading.
function ReaderStatus:onMarkBook(mark_read)
self.summary.status = (not mark_read and self.summary.status == "complete") and "reading" or "complete"
self.summary.modified = os.date("%Y-%m-%d", os.time())
-- If History is called over Reader, it will read the file to get the book status, so save and flush
self.settings:saveSetting("summary", self.summary)
self.settings:flush()

Loading…
Cancel
Save