Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReaderStatus: update status modification time #11568

Merged
merged 1 commit into from Mar 18, 2024

Conversation

hius07
Copy link
Member

@hius07 hius07 commented Mar 18, 2024

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 change is Reviewable

@Frenzie Frenzie added this to the 2024.04 milestone Mar 18, 2024
Copy link
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every time? Or put another way, what's this used for exactly? :-)

@hius07
Copy link
Member Author

hius07 commented Mar 18, 2024

We change the timestamp when changing status.

At opening a book

summary.status = "reading"
summary.modified = os.date("%Y-%m-%d", os.time())

In Book status window
self.summary.status = option_name[option_value]
self.summary.modified = os.date("%Y-%m-%d", os.time())

In file popup dialog
summary.status = status
summary.modified = os.date("%Y-%m-%d", os.time())

So let's do it in the same way at the End of the book
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())

@Frenzie Frenzie merged commit bb98cbf into koreader:master Mar 18, 2024
2 of 3 checks passed
@hius07 hius07 deleted the fix-status-modified branch March 18, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash on Reading statistics > Current book
2 participants