mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
feat: report a room
updated tests updated tests added a feature flag to report room removed delay rename
This commit is contained in:
@@ -275,9 +275,19 @@ struct RoomDetailsScreen: View {
|
||||
private var leaveRoomTitle: String {
|
||||
context.viewState.dmRecipientInfo == nil ? L10n.screenRoomDetailsLeaveRoomTitle : L10n.screenRoomDetailsLeaveConversationTitle
|
||||
}
|
||||
|
||||
private var reportRoomTitle: String {
|
||||
context.viewState.dmRecipientInfo == nil ? L10n.actionReportRoom : L10n.actionReport
|
||||
}
|
||||
|
||||
private var leaveRoomSection: some View {
|
||||
Section {
|
||||
if context.viewState.reportRoomEnabled {
|
||||
ListRow(label: .action(title: reportRoomTitle,
|
||||
icon: \.chatProblem,
|
||||
role: .destructive),
|
||||
kind: .button { context.send(viewAction: .processTapReport) })
|
||||
}
|
||||
ListRow(label: .action(title: leaveRoomTitle,
|
||||
icon: \.leave,
|
||||
role: .destructive),
|
||||
|
||||
Reference in New Issue
Block a user