Skip to content

fix: TocContoller.jumpToIndex stop working if MarkdoThewnWidget instance is replaced#259

Open
heyteacher wants to merge 5 commits into
asjqkkkk:mainfrom
heyteacher:main
Open

fix: TocContoller.jumpToIndex stop working if MarkdoThewnWidget instance is replaced#259
heyteacher wants to merge 5 commits into
asjqkkkk:mainfrom
heyteacher:main

Conversation

@heyteacher
Copy link
Copy Markdown

Removed TocContoller.jumpToWidgetIndexCallback unset on MarkdownWidgetState.dispose and add isDisposed check on jumpToWidgetIndexCallback implementation.

This avoid TocContoller stop working if MarkdownWidget is replaced by a new instance and old instance is disposed.

This happens for example in adaptive layouts implementation or multi language support, when MarkdoThewnWidget is replaced but TocContoller remain the same.

The isDisposed check preserve jumpToWidgetIndexCallback invocation after the MarkdoThewnWidget is disposed,

…State.dispose and add isDisposed check on jumpToWidgetIndexCallback implementation
…etIndexCallback-unset-on-MarkdownWidgetState.dispose

fix: TocContoller.jumpToIndex stop working if MarkdoThewnWidget instance is replaced
…ller

Support custom auto scroll controller
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.

1 participant