fix user perfs list
This commit is contained in:
parent
d3dfdfea13
commit
587ce2e9e0
|
@ -53,6 +53,8 @@ case class Hook(
|
|||
def username = user.fold(User.anonymous)(_.username)
|
||||
def lame = user ?? (_.lame)
|
||||
|
||||
lazy val perfType = PerfPicker.perfType(speed, realVariant, none)
|
||||
|
||||
lazy val perf: Option[LobbyPerf] = for { u <- user; pt <- perfType } yield u perfAt pt
|
||||
def rating: Option[Int] = perf.map(_.rating)
|
||||
|
||||
|
@ -70,8 +72,6 @@ case class Hook(
|
|||
.add("c" -> chess.Color(color).map(_.name))
|
||||
.add("perf" -> perfType.map(_.name))
|
||||
|
||||
lazy val perfType = PerfPicker.perfType(speed, realVariant, none)
|
||||
|
||||
def randomColor = color == "random"
|
||||
|
||||
lazy val compatibleWithPools =
|
||||
|
|
|
@ -30,7 +30,7 @@ private[lobby] object LobbyUser {
|
|||
|
||||
private def perfMapOf(perfs: lila.user.Perfs): PerfMap =
|
||||
perfs.perfs.collect {
|
||||
case (key, perf) if key != "puzzle" && perf.nonEmpty =>
|
||||
case (key, perf) if key != PerfType.Puzzle.key && perf.nonEmpty =>
|
||||
key -> LobbyPerf(perf.intRating, perf.provisional)
|
||||
}(scala.collection.breakOut)
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ case class Perfs(
|
|||
"horde" -> horde,
|
||||
"racingKings" -> racingKings,
|
||||
"crazyhouse" -> crazyhouse,
|
||||
"ultraBullet" -> bullet,
|
||||
"ultraBullet" -> ultraBullet,
|
||||
"bullet" -> bullet,
|
||||
"blitz" -> blitz,
|
||||
"classical" -> classical,
|
||||
|
|
Loading…
Reference in a new issue