feat: report a room

updated tests

updated tests

added a feature flag to report room

removed delay

rename
This commit is contained in:
Mauro Romito
2025-04-02 17:44:24 +02:00
committed by Mauro
parent 8149107aef
commit 2ee5c1b403
31 changed files with 750 additions and 104 deletions
@@ -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),