fix: issue in which users cannot report blocked users
Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
parent
a2571518d3
commit
859e6c76c3
|
|
@ -182,7 +182,7 @@ fun UserButtons(
|
||||||
}
|
}
|
||||||
|
|
||||||
when (user.relationship) {
|
when (user.relationship) {
|
||||||
"Friend", "Incoming", "Outgoing", "None", "BlockedOther" -> {
|
"Friend", "Incoming", "Outgoing", "None", "Blocked", "BlockedOther" -> {
|
||||||
Column { // Prevent the dropdown menu from counting towards arrangement spacing
|
Column { // Prevent the dropdown menu from counting towards arrangement spacing
|
||||||
IconButton(
|
IconButton(
|
||||||
onClick = {
|
onClick = {
|
||||||
|
|
@ -211,16 +211,20 @@ fun UserButtons(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DropdownMenuItem(
|
when (user.relationship) {
|
||||||
text = {
|
"Blocked" -> {}
|
||||||
Text(stringResource(R.string.user_info_sheet_block))
|
|
||||||
},
|
else -> DropdownMenuItem(
|
||||||
onClick = {
|
text = {
|
||||||
scope.launch {
|
Text(stringResource(R.string.user_info_sheet_block))
|
||||||
blockUser(user.id)
|
},
|
||||||
|
onClick = {
|
||||||
|
scope.launch {
|
||||||
|
blockUser(user.id)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
)
|
||||||
)
|
}
|
||||||
|
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
text = {
|
text = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue