fix ublog rank setting store

pull/9822/head
Thibault Duplessis 2021-09-17 09:09:48 +02:00
parent 7d5b798cf1
commit d739780f8b
2 changed files with 2 additions and 1 deletions

View File

@ -67,6 +67,7 @@ object SettingStore {
case _ => none
})
implicit val intReader = new StringReader[Int](_.toIntOption)
implicit val floatReader = new StringReader[Float](_.toFloatOption)
implicit val stringReader = new StringReader[String](some)
def fromIso[A](iso: lila.common.Iso[String, A]) = new StringReader[A](v => iso.from(v).some)
}

View File

@ -31,7 +31,7 @@ final class Env(
val rankFactorSetting = settingStore[Float](
"ublogRankFactor",
default = 1d,
default = 1f,
text = "Ublog rank factor".some,
onSet = _ => rank.recomputeRankOfAllPosts
).taggedWith[UblogRankFactor]