edrlab / thorium-reader

A cross platform desktop reading app, based on the Readium Desktop toolkit
https://www.edrlab.org/software/thorium-reader/
BSD 3-Clause "New" or "Revised" License
1.83k stars 154 forks source link

Reader state not properly storing on windows shutdown/log off/restart #1986

Open nandakishore2009 opened 1 year ago

nandakishore2009 commented 1 year ago

If you load a new Epub and make some changes like adding bookmark and do a window logoff, with out closing the reader, all the saved new book changes would be gone. Also on openings the Thorium again, we will see a book deleted warning toast.

PS: This issue become quite annoying for me when I read a lot of content and accidently shutdown it with out closing the reader, all my latest reading positional changes would be gone.

panaC commented 1 year ago

Hello, It's true, the application state is saved when closed. We maintain an internal modification patch and save it with a 3 minutes debounce function so as not to overload the filesystem. We need to think about it, thanks for raising the issue.

danielweck commented 4 months ago

@panaC this is fixed now?

panaC commented 4 months ago

no, not actually fixed

https://github.com/edrlab/thorium-reader/blob/518e0c19a5df298a3bece50d597bc2d3650a4c32/src/main/redux/sagas/persist.ts#L57

https://github.com/edrlab/thorium-reader/blob/518e0c19a5df298a3bece50d597bc2d3650a4c32/src/main/redux/sagas/persist.ts#L19

danielweck commented 4 months ago

Thank you, I thought so too. The reader state is now "instantly" saved without needing to close the reader window(s) but the persistence (storage I/O) is handled separately.