thorium-reader icon indicating copy to clipboard operation
thorium-reader copied to clipboard

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

Open nandakishore2009 opened this issue 1 year ago • 4 comments

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.

nandakishore2009 avatar Aug 25 '23 15:08 nandakishore2009

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.

panaC avatar Nov 06 '23 17:11 panaC

@panaC this is fixed now?

danielweck avatar Jun 17 '24 14:06 danielweck

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

panaC avatar Jun 17 '24 14:06 panaC

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.

danielweck avatar Jun 17 '24 14:06 danielweck