maforget / ComicRackCE

A Community Edition for the legendary Comic Book Manager ComicRack. ComicRack is back from the dead.
GNU General Public License v2.0
330 stars 32 forks source link

Mark As Read #95

Closed SteveHutchinsASBFA closed 3 months ago

SteveHutchinsASBFA commented 3 months ago

Hello,

Thanks for continuing this great program. ComicRack book files (cb7., cbz., etc.) that only contain one picture file are not being marked as "read" by the program. Nothing earth-shattering, just annoying. Thanks!

maforget commented 3 months ago

The reason is that the way the program keeps track of where you are in a book is just logging the CurrentPage you are on. The problem comes comes from the fact that internally the pages index are 0 based, meaning that the first page is 0 (for Page 1). Which is the same value than an unread book, so you are always on the first page. Normal since there is only 1.

The only way I can fix it without messing up with the whole program, is set the CurrentPage to 1 (so Page 2), when there is only 1 page. When opening a book where the last page is greater than the total , it just returns to the first page. So in this case it doesn't affect us.

I've fixed the Mark As Read function and also when you navigate to the next page it should also mark it as read. When scrolling, you will have to scroll to the end until it tries to load the next page or book to be marked as read. So just opening and closing will not be enough.

I've also had to fix the Info dialog so it doesn't show you being on Page 2 of 1. I don't see any other places that might need fixing.

SteveHutchinsASBFA commented 3 months ago

Thank you so much! The fix seems perfect and what a quick turnaround! I appreciate your hard work.

--Steve

On 08/07/2024 7:28 PM EDT maforget @.***> wrote:

The reason is that the way the program keeps track of where you are in a book is just logging the CurrentPage you are on. The problem comes comes from the fact that internally the pages index are 0 based, meaning that the first page is 0 (for Page 1). Which is the same value than an unread book, so you are always on the first page. Normal since there is only 1.

The only way I can fix it without messing up with the whole program, is set the CurrentPage to 1 (so Page 2), when there is only 1 page. When opening a book where the last page is greater than the total , it just returns to the first page. So in this case it doesn't affect us.

I've fixed the Mark As Read function and also when you navigate to the next page it should also mark it as read. When scrolling, you will have to scroll to the end until it tries to load the next page or book to be marked as read. So just opening and closing will be enough.

I've also had to fix the Info dialog so it doesn't show you being on Page 2 of 1. I don't see any other places that might need fixing.

— Reply to this email directly, view it on GitHub https://github.com/maforget/ComicRackCE/issues/95#issuecomment-2274513556, or unsubscribe https://github.com/notifications/unsubscribe-auth/BKL63DXE4N2OE5SNNBLZ3MTZQKUS3AVCNFSM6AAAAABMD6M6P6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZUGUYTGNJVGY. You are receiving this because you authored the thread.Message ID: @.***>