-
Notifications
You must be signed in to change notification settings - Fork 369
Ensure confirmation dialog is displayed when an admin add other admin to a room #5786
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
Conversation
|
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
jmartinesp
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.
A couple of comments, I'm just waiting for the tests to pass before approving. Thanks for fixing these issues!
| } | ||
|
|
||
| val hasPendingChanges = usersWithRole.value != selectedUsers.value | ||
| val hasPendingChanges = usersWithRole.value.toSet() != selectedUsers.value.toSet() |
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.
If this will be executed in every recomposition maybe we should have it inside a remember { derivedStateOf { ... } } so we don't create two new sets every time.
| Text("Room version") | ||
| }, | ||
| supportingContent = { | ||
| Text( | ||
| text = roomVersion ?: "Unknown", |
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.
Should we have some localazy strings for these?
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.
This should be handled as a global task to add all the strings from the developer settings to Localazy. For now I think we should not care.
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 figured that was the case, but since this is a developer UI even though it's not in the developer settings I wanted to double check first 👍 .
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.
Maybe one day lint will complain about hard-coded string like it used to do in Android Views, but for now let's be lazy!
| */ | ||
| fun RoomInfo.roleOf(userId: UserId): RoomMember.Role { | ||
| return if (creators.contains(userId)) { | ||
| return if (privilegedCreatorRole && creators.contains(userId)) { |
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, nice catch!
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #5786 +/- ##
========================================
Coverage 79.53% 79.54%
========================================
Files 2444 2446 +2
Lines 65574 65593 +19
Branches 8352 8355 +3
========================================
+ Hits 52157 52176 +19
+ Misses 10438 10437 -1
- Partials 2979 2980 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|



Content
Ensure confirmation dialog is displayed when an admin add other admin to a room.
An issue in the code made admin of room owners with higher power level and in this case confirmation dialog does not have to be displayed.
Take the opportunity to cleanup the code, and add the room version rendering in the room details when developer mode is on.
Motivation and context
Closes https://github.com/element-hq/customer-success/issues/647
Screenshots / GIFs
Tests
Tested devices
Checklist