mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Report room and decline & block screens tweaks (#4044)
* report rom and decline and block screens tweaks - Use the copies: "Leave room" and "Report room" everywhere, also in DMs - Report reason in report room is now mandatory. - Report reason in decline and block is now mandatory if the report action is set to on. - Generic alert for failure of main API in both report room and decline and block has been added * report room and decline and block screen previews
This commit is contained in:
@@ -272,23 +272,15 @@ 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.actionReportDm
|
||||
}
|
||||
|
||||
private var leaveRoomSection: some View {
|
||||
Section {
|
||||
if context.viewState.reportRoomEnabled {
|
||||
ListRow(label: .action(title: reportRoomTitle,
|
||||
ListRow(label: .action(title: L10n.actionReportRoom,
|
||||
icon: \.chatProblem,
|
||||
role: .destructive),
|
||||
kind: .button { context.send(viewAction: .processTapReport) })
|
||||
}
|
||||
ListRow(label: .action(title: leaveRoomTitle,
|
||||
ListRow(label: .action(title: L10n.screenRoomDetailsLeaveRoomTitle,
|
||||
icon: \.leave,
|
||||
role: .destructive),
|
||||
kind: .button { context.send(viewAction: .processTapLeave) })
|
||||
|
||||
Reference in New Issue
Block a user