Skip to content

Added feature: Option to update Hardcover page/status when closing a book. - #37

Open
RippedNosferatu wants to merge 4 commits into
Billiam:mainfrom
RippedNosferatu:UpdateOnCloseFeature
Open

RippedNosferatu wants to merge 4 commits into
Billiam:mainfrom
RippedNosferatu:UpdateOnCloseFeature

Conversation

@RippedNosferatu

Copy link
Copy Markdown

--- Option in settings to enable/disable this feature.
--- Changed OnDocumentClose() to OnCloseDocument() to trigger update outside of the reader UI.
--- reordered a couple update events to receive needed true flag on page_update_pending during OnCloseDocument()

--- Option in settings to enable/disable this feature.
--- Changed OnDocumentClose() to OnCloseDocument() to trigger update outside of the reader UI.
--- reordered a couple update events to received needed true flag on page_update_pending during OnCloseDocument
@RippedNosferatu

Copy link
Copy Markdown
Author

Honestly not too familiar with Git, was just adding this option for myself but figured I'd throw it out there in case it was something worth adding.

@Billiam

Billiam commented Nov 27, 2025

Copy link
Copy Markdown
Owner

Thanks for your contribution!

I'm hesitant to add additional options unless absolutely necessary, since it means supporting multiple behaviors forever.

What was your motivation for adding the option to enable/disable updating status when closing a book? It seemed to me that if somebody was interested in updating their progress in the background, they wouldn't have a need to disable those updates when closing a book.

@RippedNosferatu

Copy link
Copy Markdown
Author

Totally understandable!

Good question! Initially of course I used the option to update every however many minutes, but found the cluttered updates in the reading journal in Hardcover a little jarring. So for I while a resorted to just manually updating after each reading session, just to make it easier to gauge reading frequency. This is totally a non-issue lol, but thought I'd give it a shot

@Billiam

Billiam commented Dec 3, 2025

Copy link
Copy Markdown
Owner

Do you exit out of/close your book after every reading session, or is that something you'd only do in order to trigger an update?

@RippedNosferatu

Copy link
Copy Markdown
Author

I do, just out of habit, and in case I swap to a different book between sessions

…i.e when Update on Close is enabled, as with onCloseDocument. This ensures that any pending page updates are processed when the app is suspended.
@laughedelic

Copy link
Copy Markdown

I think it would be a good option to have.

I kind of expected it when I was looking at the settings. If I want to generally keep my progress in sync and have it turned on for a book, I'd be surprised if it doesn't update when I close the book (e.g. to read another one). Considering that the other options for update (periodic and percetage) have a lag.

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.

3 participants