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)
This commit is contained in:
hius07
2024-03-18 18:35:35 +02:00
committed by GitHub
parent 424fa9b6fd
commit bb98cbf612

View File

@@ -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()