Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move pdf support check from viewer to renderer #392

Conversation

luke-stead-sonocent
Copy link
Contributor

We're currently not able to test pdfx viewer components in CI, as the viewer components assert that the current device has PDF support, and our CI is running linux. We've mocked out the pdf renderer, and we're supplying a MockPdfDocument to PdfView, which works fine on MacOS, but fails in CI. By moving the check to the renderer we can successfully test PdfView in CI.

I also removed PdfViewState._currentIndex. The main reason is because it was late inited, and removing the await hasPdfSupport check meant that it started being accessed before it was inited. It also had an off by one error on initialisation. Instead, we can just use the current value of the pageListenable.

@SergeShkurko
Copy link
Member

@luke-stead-sonocent thanks for you contribution!

@SergeShkurko SergeShkurko merged commit bb1521d into ScerIO:main Jun 30, 2023
0 of 27 checks passed
@luke-stead-sonocent luke-stead-sonocent deleted the move-pdf-support-check-to-renderer branch June 30, 2023 14:09
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.

None yet

2 participants