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:
Mauro
2025-04-22 11:44:20 +02:00
committed by GitHub
parent cffcb5c7b9
commit 7183b0fe19
19 changed files with 64 additions and 36 deletions
@@ -15,7 +15,10 @@ struct DeclineAndBlockScreenViewState: BindableState {
var bindings = DeclineAndBlockScreenViewStateBindings()
var isDeclineDisabled: Bool {
!bindings.shouldBlockUser && !bindings.shouldReport
if bindings.shouldReport {
return bindings.reportReason.isEmpty
}
return !bindings.shouldBlockUser && !bindings.shouldReport
}
}
@@ -23,9 +26,15 @@ struct DeclineAndBlockScreenViewStateBindings {
var shouldBlockUser = true
var shouldReport = false
var reportReason = ""
var alert: AlertInfo<DeclineAndBlockAlertType>?
}
enum DeclineAndBlockScreenViewAction {
case decline
case dismiss
}
enum DeclineAndBlockAlertType {
case declineFailed
}