-
Notifications
You must be signed in to change notification settings - Fork 369
Reload member list after moderation actions #5268
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
Reload member list after moderation actions #5268
Conversation
The previous `runActionAndWaitForMembershipChange` logic wasn't really doing anything, as the modified flow was never used.
|
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5268 +/- ##
========================================
Coverage 80.21% 80.21%
========================================
Files 2239 2239
Lines 61503 61507 +4
Branches 7791 7791
========================================
+ Hits 49333 49337 +4
Misses 9314 9314
Partials 2856 2856 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bmarty
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
| unbanUserAsyncAction.value = AsyncAction.ConfirmingNoParams | ||
| } | ||
| } | ||
| moderationActions.value = persistentListOf() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure to understand the effect of this. It is supposed to close the bottom sheet as soon as an action is selected, to avoid that a bottom sheet is displayed at the same time as a confirmation dialog, but this is already the current behavior. Is there some other rationale?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is supposed to close the bottom sheet as soon as an action is selected, to avoid that a bottom sheet is displayed at the same time as a confirmation dialog, but this is already the current behavior.
It wasn't after I made these changes, I had to manually set it to an empty list or both the action list and the confirmation dialog would be displayed at the same time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, it's because the actions were computed for the user I was banning, then I tried to unban that same user, and it was displaying the previously calculated actions, which no longer apply.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, thanks!
… if the underlying coroutine scope is no longer there. With `emit`, the `Ready` state was not emitted if the member list was loaded way too fast.
5e526d7 to
5b5f1db
Compare
|



Content
Readystate is set to the flow, even if theLaunchedEffect/collectLatestscope is cancelled.Motivation and context
The previous
runActionAndWaitForMembershipChangelogic wasn't really doing anything, as the modified flow was never used. This means kicking, banning or unbanning a user didn't reload the member list consistently.Tests
In a room you're an admin/moderator:
Tested devices
Checklist