mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
More Moderation tweaks (#2566)
* Show room member role changes in the timeline. * Fix a bug in room flow coordinator. * Tidy up roles and permissions flow. * Refresh the power levels in the room details screen. * Automatically update permissions after saving. * Remove extra button. * Add a short delay to the roles and permissions screen snapshots. The permissions rows are now in a loading state initially.
This commit is contained in:
+7
@@ -82,24 +82,30 @@ struct RoomRolesAndPermissionsScreen: View {
|
||||
Section {
|
||||
ListRow(label: .default(title: L10n.screenRoomRolesAndPermissionsRoomDetails,
|
||||
icon: \.info),
|
||||
details: .isWaiting(context.viewState.permissions == nil),
|
||||
kind: .navigationLink {
|
||||
context.send(viewAction: .editPermissions(.roomDetails))
|
||||
})
|
||||
.accessibilityIdentifier(A11yIdentifiers.roomRolesAndPermissionsScreen.roomDetails)
|
||||
.disabled(context.viewState.permissions == nil)
|
||||
|
||||
ListRow(label: .default(title: L10n.screenRoomRolesAndPermissionsMessagesAndContent,
|
||||
icon: \.chat),
|
||||
details: .isWaiting(context.viewState.permissions == nil),
|
||||
kind: .navigationLink {
|
||||
context.send(viewAction: .editPermissions(.messagesAndContent))
|
||||
})
|
||||
.accessibilityIdentifier(A11yIdentifiers.roomRolesAndPermissionsScreen.messagesAndContent)
|
||||
.disabled(context.viewState.permissions == nil)
|
||||
|
||||
ListRow(label: .default(title: L10n.screenRoomRolesAndPermissionsMemberModeration,
|
||||
icon: \.user),
|
||||
details: .isWaiting(context.viewState.permissions == nil),
|
||||
kind: .navigationLink {
|
||||
context.send(viewAction: .editPermissions(.memberModeration))
|
||||
})
|
||||
.accessibilityIdentifier(A11yIdentifiers.roomRolesAndPermissionsScreen.memberModeration)
|
||||
.disabled(context.viewState.permissions == nil)
|
||||
} header: {
|
||||
Text(L10n.screenRoomRolesAndPermissionsPermissionsHeader)
|
||||
.compoundListSectionHeader()
|
||||
@@ -126,5 +132,6 @@ struct RoomRolesAndPermissionsScreen_Previews: PreviewProvider, TestablePreview
|
||||
NavigationStack {
|
||||
RoomRolesAndPermissionsScreen(context: viewModel.context)
|
||||
}
|
||||
.snapshot(delay: 0.2)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user