mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Fix various bugs in the moderation feature. (#2608)
* Fix search field string. * Show your own user as an Admin when changing roles. * Also show invited users when changing roles. * Don't allow admin's to kick/ban other admins or themselves. * Fix a bug when left members were counted as admins/moderators. * Show when a member is pending. * Add sections to the change role screen.
This commit is contained in:
+2
-2
@@ -94,8 +94,8 @@ class RoomRolesAndPermissionsScreenViewModel: RoomRolesAndPermissionsScreenViewM
|
||||
// MARK: - Members
|
||||
|
||||
private func updateMembers(_ members: [RoomMemberProxyProtocol]) {
|
||||
state.administratorCount = members.filter { $0.role == .administrator }.count
|
||||
state.moderatorCount = members.filter { $0.role == .moderator }.count
|
||||
state.administratorCount = members.filter { $0.role == .administrator && $0.isActive }.count
|
||||
state.moderatorCount = members.filter { $0.role == .moderator && $0.isActive }.count
|
||||
}
|
||||
|
||||
private func updateOwnRole(_ role: RoomMemberDetails.Role) async {
|
||||
|
||||
Reference in New Issue
Block a user