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

Simplify the PDFDocumentProperties.#updateUI method #18655

Conversation

Snuffleupagus
Copy link
Collaborator

We can remove the reset-parameter, since it's redundant, given that it's only used after PDFDocumentProperties.#reset has been invoked which means that this.#fieldData === null which is equivalent to resetting.
Also, we don't need to have two separate loops in order to update the UI in this method.

@Snuffleupagus Snuffleupagus force-pushed the PDFDocumentProperties-updateUI-rm-param branch from 055afbc to 7dccf44 Compare August 29, 2024 10:47
We can remove the `reset`-parameter, since it's redundant, given that it's only used after `PDFDocumentProperties.#reset` has been invoked which means that `this.#fieldData === null` which is equivalent to resetting.
Also, we don't need to have two separate loops in order to update the UI in this method.

Finally, inline the `DEFAULT_FIELD_CONTENT` constant now that it's only used once.
@Snuffleupagus Snuffleupagus force-pushed the PDFDocumentProperties-updateUI-rm-param branch from 7dccf44 to a5d0e41 Compare August 29, 2024 10:48
@mozilla mozilla deleted a comment from moz-tools-bot Aug 29, 2024
@mozilla mozilla deleted a comment from moz-tools-bot Aug 29, 2024
@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/756650e32921c22/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/756650e32921c22/output.txt

Total script time: 1.00 mins

Published

@timvandermeij timvandermeij merged commit 044e761 into mozilla:master Aug 29, 2024
6 checks passed
@timvandermeij
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants