From 222ad9dcb67dbda4e69b7e67a1d94175a1d57fb4 Mon Sep 17 00:00:00 2001 From: Thibault Duplessis Date: Sun, 16 Jun 2024 20:52:40 +0200 Subject: [PATCH] disable blocked player's dropdown items - closes #15536 --- modules/relation/src/main/ui/RelationUi.scala | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/relation/src/main/ui/RelationUi.scala b/modules/relation/src/main/ui/RelationUi.scala index 8a3a39a07fbe..5ba6e197671c 100644 --- a/modules/relation/src/main/ui/RelationUi.scala +++ b/modules/relation/src/main/ui/RelationUi.scala @@ -51,8 +51,9 @@ final class RelationUi(helpers: Helpers): blocked: Boolean, signup: Boolean = false )(using ctx: Context) = + val blocks = relation.contains(Relation.Block) div(cls := "relation-actions")( - (ctx.isnt(user) && !blocked).option( + (ctx.isnt(user) && !blocked && !blocks).option( a( cls := "text", href := s"${routes.Lobby.home}?user=${user.name}#friend", @@ -64,14 +65,14 @@ final class RelationUi(helpers: Helpers): (!user.is(myId)) .so( frag( - (!blocked && !user.isBot).option( + (!blocked && !blocks && !user.isBot).option( a( cls := "text", href := routes.Msg.convo(user.name), dataIcon := Icon.BubbleSpeech )(trans.site.composeMessage.txt()) ), - (!blocked && !user.isPatron).option( + (!blocked && !blocks && !user.isPatron).option( a( cls := "text", href := s"${routes.Plan.list}?dest=gift&giftUsername=${user.name}",