Comparing mutable state was wrong
This commit is contained in:
parent
7c6aa0655b
commit
c39c4260eb
1 changed files with 1 additions and 2 deletions
|
|
@ -134,11 +134,10 @@ class ChangeRolesPresenter(
|
|||
is ChangeRolesEvent.Save -> {
|
||||
val currentUserIsAdmin = roomInfo.roleOf(room.sessionId) == RoomMember.Role.Admin
|
||||
val isModifyingAdmins = role == RoomMember.Role.Admin
|
||||
val hasChanges = selectedUsers != usersWithRole
|
||||
val isConfirming = saveState.value.isConfirming()
|
||||
val modifyingOwners = role is RoomMember.Role.Owner
|
||||
|
||||
val needsConfirmation = (modifyingOwners || currentUserIsAdmin && isModifyingAdmins) && hasChanges && !isConfirming
|
||||
val needsConfirmation = (modifyingOwners || currentUserIsAdmin && isModifyingAdmins) && hasPendingChanges && !isConfirming
|
||||
|
||||
when {
|
||||
needsConfirmation -> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue