Skip to content

Conversation

@lbeus
Copy link
Contributor

@lbeus lbeus commented Jan 15, 2026

  • EPUBNavigatorViewController allows providing readingOrder as an input param
  • EPUBNavigatorViewModel was always using readingOrder from publication model and this fix passes readingOrder from view controller if available, otherwise it would just use readingOrder from publication model as before.

Copy link
Member

@mickael-menu mickael-menu left a comment

Choose a reason for hiding this comment

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

Nice catch, thank you for sending a fix!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a synchronization issue where EPUBNavigatorViewModel was always using publication.readingOrder instead of respecting the custom readingOrder parameter that could be provided to EPUBNavigatorViewController.

Changes:

  • Modified EPUBNavigatorViewModel to accept and store a readingOrder parameter instead of always deriving it from the publication
  • Updated EPUBNavigatorViewController to pass the resolved readingOrder to the view model and reuse it from there

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
Sources/Navigator/EPUB/EPUBNavigatorViewModel.swift Changed readingOrder from computed property to stored property; added parameter to both initializers
Sources/Navigator/EPUB/EPUBNavigatorViewController.swift Passes readingOrder to view model initialization and reuses viewModel.readingOrder instead of recalculating
CHANGELOG.md Added entry documenting the fix for custom reading order support

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mickael-menu mickael-menu merged commit 80b581e into readium:develop Jan 15, 2026
22 of 24 checks passed
@lbeus lbeus deleted the fix/reading-order-config branch January 16, 2026 07:31
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.

2 participants