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: Multiple permission update toasts are spawned #13584

Conversation

alexjba
Copy link
Contributor

@alexjba alexjba commented Feb 15, 2024

What does the PR do

Closes #13369

This behaviour is encountered only when updating the permissions in the channel edit popup because the community description is updated in 2 steps: 1 - Update the channel; 2 - update the permissions.

Flow:

  1. Call channel update rpc
  2. Call permission update rpc
  3. Update the local permissions -> Emit permission created event
  4. Receive the community description from step 1 (with older permissions) -> Emit permission deleted event + update the local permissions;
  5. Receive the community description from step 2 (new permissions) -> Emit permission created event + update the local permission again

In this case the permissions updates are processed twice. Once when the permission update is called to the backend and the second time when the event for the new community description is received.

To fix this the permissions are not updated anymore when the backend rpc is called. The update happens only when the community description signal is received.

Affected areas

Community permissions

Screenshot of functionality (including design for comparison)

Screen.Recording.2024-02-15.at.23.18.50.mov

Cool Spaceship Picture

The permissions updates are done twice. Once when the permission update is called to the backend and the second time when the event for the new community description is received.
The permissions are not updated anymore when the backend rpc is called. The update happens only when the community description signal is received
@status-im-auto
Copy link
Member

status-im-auto commented Feb 15, 2024

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ e1b0fcf #1 2024-02-15 21:34:49 ~6 min tests/nim 📄log
✔️ e1b0fcf #1 2024-02-15 21:35:59 ~7 min macos/aarch64 🍎dmg
✔️ e1b0fcf #1 2024-02-15 21:38:26 ~9 min macos/x86_64 🍎dmg
✔️ e1b0fcf #1 2024-02-15 21:38:36 ~10 min tests/ui 📄log
✔️ e1b0fcf #1 2024-02-15 21:44:52 ~16 min linux/x86_64 📦tgz
✔️ e1b0fcf #1 2024-02-15 22:02:53 ~34 min windows/x86_64 💿exe

Copy link
Member

@caybro caybro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexjba alexjba merged commit e805dd0 into master Feb 16, 2024
8 checks passed
@alexjba alexjba deleted the 13369-channel-permissions-creatingediting-channel-permissions-will-spawn-multiple-notifications branch February 16, 2024 11:25
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.

[Channel permissions] Creating/editing channel permissions will spawn multiple notifications
4 participants