pocketbook-coolreader icon indicating copy to clipboard operation
pocketbook-coolreader copied to clipboard

revamp .cr3hist storage

Open blchinezu opened this issue 8 years ago • 2 comments

http://www.mobileread.com/forums/showthread.php?p=3241743#post3241743

pkb

CR stores reading position and highlights in the .cr3hist file. It is ok when there is only
one instance of CR (its intended use). I assume when you switch the book you run another
instances of the CR. Every instance saves reading position and highlits at exit and
overwrites what was saved by another instance i.e. only last one's data will be preserved.
To fix this someone will have to implement another storage mechanism allowing record level
access to the data like db or some interprocess communication so that only one instance
would write the data.

blchinezu avatar Jan 20 '16 10:01 blchinezu

You also could experiment with events. I think, if we saveHistory() at EVT_BACKGROUND and loadHistory() at EVT_FOREGROUND (or whatever event that comes when we switch back to CR) we will not be losing history anymore.

pkb avatar Jan 22 '16 02:01 pkb

I confirm this bug. It's very frustrating that when you read several books in one session, the position of all but one is not remembered.

dymn avatar Dec 17 '17 09:12 dymn