Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
yahya-lafhal committed Oct 23, 2024
1 parent bbe24f1 commit 688c7b4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
3 changes: 2 additions & 1 deletion app/views/game/side.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion app/views/user/ui.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
3 changes: 1 addition & 2 deletions modules/game/src/main/ui/GameUi.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
10 changes: 5 additions & 5 deletions modules/pref/src/main/Pref.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
)

Expand Down

0 comments on commit 688c7b4

Please sign in to comment.