fix: issue in which users cannot report blocked users

Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
Infi 2024-02-19 00:19:05 +01:00
parent a2571518d3
commit 859e6c76c3
1 changed files with 14 additions and 10 deletions

View File

@ -182,7 +182,7 @@ fun UserButtons(
}
when (user.relationship) {
"Friend", "Incoming", "Outgoing", "None", "BlockedOther" -> {
"Friend", "Incoming", "Outgoing", "None", "Blocked", "BlockedOther" -> {
Column { // Prevent the dropdown menu from counting towards arrangement spacing
IconButton(
onClick = {
@ -211,16 +211,20 @@ fun UserButtons(
}
}
DropdownMenuItem(
text = {
Text(stringResource(R.string.user_info_sheet_block))
},
onClick = {
scope.launch {
blockUser(user.id)
when (user.relationship) {
"Blocked" -> {}
else -> DropdownMenuItem(
text = {
Text(stringResource(R.string.user_info_sheet_block))
},
onClick = {
scope.launch {
blockUser(user.id)
}
}
}
)
)
}
DropdownMenuItem(
text = {