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

fix(meta): fix meta data saving issue requiring two clicks #1268

Merged
merged 1 commit into from
Apr 23, 2023
Merged

Conversation

ysfscream
Copy link
Member

@ysfscream ysfscream commented Apr 23, 2023

PR Checklist

If you have any questions, you can refer to the Contributing Guide

What is the current behavior?

image

Issue Number

Example: #123

What is the new behavior?

This Pull Request resolves an issue where users must click the "Save" button twice to save meta data successfully. The changes in this PR streamline the process, allowing users to save the metadata with a single click and improve code readability and maintainability.

  1. Refactored and introduced isValidProp() function for better code reusability.
  2. Updated getHasMqtt5PropState() function to use isValidProp() and Object.values() for better performance and readability.
  3. Modified saveMeta() function to update hasMqtt5Prop after calling updatePushProp().

Please describe the new behavior or provide screenshots.

Does this PR introduce a breaking change?

  • Yes
  • No

Specific Instructions

Are there any specific instructions or things that should be known prior to review?

Other information

@ysfscream ysfscream added fix Fix bug or issues desktop MQTTX Desktop labels Apr 23, 2023
@ysfscream ysfscream requested a review from Red-Asuka April 23, 2023 07:20
@ysfscream ysfscream self-assigned this Apr 23, 2023
@Red-Asuka Red-Asuka merged commit bc65f46 into main Apr 23, 2023
@Red-Asuka Red-Asuka deleted the ysf/dev branch April 23, 2023 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
desktop MQTTX Desktop fix Fix bug or issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants