Fix demote yourself issue
This commit is contained in:
parent
959be3a23d
commit
3430a8f3ea
@ -159,7 +159,7 @@ class RoomMemberProfileViewModel @AssistedInject constructor(@Assisted private v
|
||||
val myPowerLevel = PowerLevelsHelper(currentPowerLevelsContent).getUserPowerLevelValue(session.myUserId)
|
||||
if (action.askForValidation && action.newValue >= myPowerLevel) {
|
||||
_viewEvents.post(RoomMemberProfileViewEvents.ShowPowerLevelValidation(action.previousValue, action.newValue))
|
||||
} else if (state.isMine) {
|
||||
} else if (action.askForValidation && state.isMine) {
|
||||
_viewEvents.post(RoomMemberProfileViewEvents.ShowPowerLevelDemoteWarning(action.previousValue, action.newValue))
|
||||
} else {
|
||||
currentPowerLevelsContent.users[state.userId] = action.newValue
|
||||
|
||||
Loading…
Reference in New Issue
Block a user