mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user