Skip to content

Added two page spread detection, and a small cleanup. - #78

Open
hatlessman wants to merge 2 commits into
KORComic:mainfrom
hatlessman:detectspreads
Open

Added two page spread detection, and a small cleanup.#78
hatlessman wants to merge 2 commits into
KORComic:mainfrom
hatlessman:detectspreads

Conversation

@hatlessman

Copy link
Copy Markdown

Added a "Detect Spreads" option in Document Settings. Checks for pages wider than they are tall and assumes they are dual page spreads displaying them alone. Also a small cleanup in init.lua, duplicate action.

I'm a python guy, I used Gemini to write the change. Looks ok to me and I tested it on my kobo.

…s wider than they are tall and assumes they are dual page spreads displaying them alone. Also a small cleanup in init.lua, duplicate action.

@OGKevin OGKevin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. It looks alright indeed.

Can you update the function documentations accordingly, with the new behaviour and update the user docs documenting the new setting.

Both for the dispatcher page and config page:

@hatlessman

Copy link
Copy Markdown
Author

Added a second commit with the changes to documentation. Take a look.

@OGKevin

OGKevin commented Mar 23, 2026

Copy link
Copy Markdown
Member

Can you fix the formatting linters and luacheck.

Next to this, how does bookmarking work here?
IIRC, when in dual mode and you hit bookmark, you get an option to pick which of the 2 pages. But now we're showing 1 big page. You didn't modify the code that handles bookmarking.

Would most likely need to be something along the lines of:

-- We are on the last page and it's alone
if self.current_pair_base == self.number_of_pages then
callback(self.current_page)
return
end

@luishfonseca luishfonseca mentioned this pull request May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option for Auto-Enable for unopened documents

2 participants