diff --git a/app/views/game/side.scala b/app/views/game/side.scala index 170e2a09963f..16c3583c009a 100644 --- a/app/views/game/side.scala +++ b/app/views/game/side.scala @@ -83,7 +83,8 @@ object side: withOnline = false, withDiff = true, withBerserk = true, - withRating = !ctx.pref.hideRatingsInGame || !game.playable || !ctx.userId.exists(game.userIds.has) + withRating = + !ctx.pref.hideRatingsInGame || !game.playable || !ctx.userId.exists(game.userIds.has) ) ), tour.flatMap(_.teamVs).map(_.teams(p.color)).map { diff --git a/app/views/user/ui.scala b/app/views/user/ui.scala index 88c57ccca0bc..00198917d44f 100644 --- a/app/views/user/ui.scala +++ b/app/views/user/ui.scala @@ -43,7 +43,7 @@ def mini( (playingGame match case Some(pov) => !pov.game.playable || !ctx.userId.exists(pov.game.userIds.has) case None => !isUserPlaying - ) + ) show.ui.mini(u, playing, blocked, followable, ping, rel, crosstable, flag, perfs, userMarks, showRating) val perfStat = lila.perfStat.PerfStatUi(helpers)(views.user.bits.communityMenu("ratings")) diff --git a/modules/game/src/main/ui/GameUi.scala b/modules/game/src/main/ui/GameUi.scala index 6ce87df0b1e3..8811922a7fe5 100644 --- a/modules/game/src/main/ui/GameUi.scala +++ b/modules/game/src/main/ui/GameUi.scala @@ -27,8 +27,7 @@ final class GameUi(helpers: Helpers): pov, withLink.option(gameLink(pov.game, pov.color, ownerLink, tv)), showRatings = - if ctx.pref.hideRatingsInGame then - !pov.game.playable || !ctx.userId.exists(pov.game.userIds.has) + if ctx.pref.hideRatingsInGame then !pov.game.playable || !ctx.userId.exists(pov.game.userIds.has) else ctx.pref.showRatings ) diff --git a/modules/pref/src/main/Pref.scala b/modules/pref/src/main/Pref.scala index 3ded81fb965d..057b0d751f7b 100644 --- a/modules/pref/src/main/Pref.scala +++ b/modules/pref/src/main/Pref.scala @@ -92,7 +92,7 @@ case class Pref( def isZen = zen == Zen.YES def isZenAuto = zen == Zen.GAME_AUTO - def showRatings = ratings != Ratings.NO + def showRatings = ratings != Ratings.NO def hideRatingsInGame = ratings == Ratings.EXCEPT_GAME def is2d = !is3d @@ -427,13 +427,13 @@ object Pref: ) object Ratings: - val NO = 0 - val YES = 1 + val NO = 0 + val YES = 1 val EXCEPT_GAME = 2 val choices = Seq( - NO -> "No", - YES -> "Yes", + NO -> "No", + YES -> "Yes", EXCEPT_GAME -> "Except in-game" )