only show current lag when online
parent
00a74806ac
commit
afbe041395
|
@ -55,7 +55,7 @@ object User extends LilaController {
|
|||
crosstable <- ctx.userId ?? { Env.game.crosstableApi(user.id, _) }
|
||||
followable <- ctx.isAuth ?? { Env.pref.api.followable(user.id) }
|
||||
relation <- ctx.userId ?? { relationApi.fetchRelation(_, user.id) }
|
||||
ping = UserLagCache.getLagRating(user.id)
|
||||
ping = env.isOnline(user.id) ?? UserLagCache.getLagRating(user.id)
|
||||
res <- negotiate(
|
||||
html = !ctx.is(user) ?? GameRepo.lastPlayedPlaying(user) map { pov =>
|
||||
Ok(html.user.mini(user, pov, blocked, followable, relation, ping, crosstable))
|
||||
|
|
|
@ -274,8 +274,8 @@ trait UserHelper { self: I18nHelper with StringHelper with NumberHelper =>
|
|||
val patronIconChar = ""
|
||||
val lineIconChar = ""
|
||||
|
||||
val lineIcon: String = s"""<i class="line"></i>"""
|
||||
val patronIcon: String = s"""<i class="line patron" title="lichess Patron"></i>"""
|
||||
val lineIcon: String = """<i class="line"></i>"""
|
||||
val patronIcon: String = """<i class="line patron" title="lichess Patron"></i>"""
|
||||
private def lineIcon(patron: Boolean): String = if (patron) patronIcon else lineIcon
|
||||
private def lineIcon(user: Option[LightUser]): String = lineIcon(user.??(_.isPatron))
|
||||
def lineIcon(user: User): String = lineIcon(user.isPatron)
|
||||
|
|
Loading…
Reference in New Issue