Repository navigation
Added feature: Option to update Hardcover page/status when closing a book. - #37
RippedNosferatu wants to merge 4 commits into
Conversation
--- 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
|
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. |
|
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. |
|
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 |
|
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? |
|
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.
|
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. |
--- 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()