Skip to content

feat: current toc item and page information as a stream#77

Draft
m-abs wants to merge 15 commits intomainfrom
feat/current-toc
Draft

feat: current toc item and page information as a stream#77
m-abs wants to merge 15 commits intomainfrom
feat/current-toc

Conversation

@m-abs
Copy link
Collaborator

@m-abs m-abs commented Feb 27, 2026

Provide a better way to know the current toc item and page information from the plugin.

From LYT4 we have inherited a problematic way of handling current toc and information about current page. These are added to the current locator's fragments where they don't belong.

This removes a lot of the inherited javascript from LYT4.

  • Android: find current toc item for text locator
  • Android: find current toc item for TTS timebased locator
  • Android: find current toc item for pure audiobook timebased locator
  • Android: find current toc item for synced audiobook timebased locator
  • Android: move page, totalPages and physicalPage from fragments
  • Android: remove calls to deleted javascript functions
  • ios: find current toc item for text locator
  • ios: find current toc item for TTS timebased locator
  • ios: find current toc item for pure audiobook timebased locator
  • ios: find current toc item for synced audiobook timebased locator
  • ios: move page, totalPages and physicalPage from fragments
  • ios: remove calls to deleted javascript functions
  • A stream for the new data, unless we want to keep it in the locators only.
  • TOC lookup needs to work for both packaged and streaming books.

@m-abs m-abs requested a review from ddfreiling February 27, 2026 16:02
@m-abs m-abs changed the title feat: current toc item as a stream feat: current toc item and page information as a stream Feb 27, 2026
m-abs and others added 10 commits March 2, 2026 12:52
… into feat/current-toc

* 'feat/current-toc' of github.com:Notalib/flutter_readium:
  fix(android): List<Link>.flatten also flattened alternates, we only want it to flatten children in the TOC
  findCssSelectorForLocator sometimes found the wrong cssSelector
…idn't work

Progression from the locator and progressing in the elements from the content service doesn't match, so we found the wrong cssSelector.
Switching back to using the readium.findFirstVisibleLocator() instead.
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