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(desktop): share one message event #1684

Merged
merged 2 commits into from
Jun 7, 2024
Merged

fix(desktop): share one message event #1684

merged 2 commits into from
Jun 7, 2024

Conversation

ysfscream
Copy link
Member

What is the current behavior?

The current subscribers of the observer repeatedly process a message multiple times.

image

What is the new behavior?

By using shareReplay(1), the message processing results are cached and shared, avoiding duplicate processing while ensuring all subscribers can correctly handle different messages. These changes ensure that each message is processed only once without affecting the original business logic and functionality.
Please describe the new behavior or provide screenshots.

image

Does this PR introduce a breaking change?

  • Yes
  • No

@ysfscream ysfscream added enhancement New feature or request fix Fix bug or issues desktop MQTTX Desktop labels Jun 7, 2024
@ysfscream ysfscream added this to the v1.10.0 milestone Jun 7, 2024
@ysfscream ysfscream requested a review from Red-Asuka June 7, 2024 01:29
@ysfscream ysfscream self-assigned this Jun 7, 2024
@Red-Asuka Red-Asuka merged commit 26be2fe into main Jun 7, 2024
1 check passed
@Red-Asuka Red-Asuka deleted the ysf/desktop branch June 7, 2024 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
desktop MQTTX Desktop enhancement New feature or request fix Fix bug or issues
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants