elfbutt / koreader-coverbrowserclean

Edits to the KOReader Cover Browser plugin
http://koreader.rocks/
GNU Affero General Public License v3.0
1 stars 0 forks source link

Book page count incorrect #3

Closed elfbutt closed 3 months ago

elfbutt commented 3 months ago

"if you have a folder that contains exactly as many books as you have coverview set to display items per page, it says there's a page 2 of books but there's not, it's empty

presumably it would do the same for book counts divisible by items per page too

if that navbar footer with the page counts and << < > >> buttons is in coverview, it's an easy fix. if that footer is drawn the same as the titlebar... very less easy"

due to removal of ../ menu item without forcing a recount of list menu items

elfbutt commented 3 months ago

the ../ is inserted here https://github.com/elfbutt/koreader-coverbrowserclean/blob/a7d1e4f816922d9acf25e15c7c6a8e0ab694f9ac/frontend/ui/widget/filechooser.lua#L445

Should be able to intercept the call of that function, run it, and then remove the item from the list afterwards.

Note how this example intercepts, runs code, and then runs the original afterwards. https://github.com/elfbutt/koreader-coverbrowserclean/blob/a7d1e4f816922d9acf25e15c7c6a8e0ab694f9ac/plugins/coverbrowser.koplugin/main.lua#L681

elfbutt commented 3 months ago

This should fix it https://github.com/elfbutt/koreader-coverbrowserclean/commit/bd2e0d4e6761637a0ae04a659c820d0876cdc6b6