simplify identity checks

This commit is contained in:
Thibault Duplessis 2016-08-24 16:14:08 +02:00
parent 808cb8c040
commit 3d99998434
2 changed files with 2 additions and 2 deletions

View file

@ -139,7 +139,7 @@ description = describeUser(u)).some) {
}
}
<div class="user-infos scroll-shadow-hard">
@if(ctx.me.fold(true)(u !=)) {
@if(!ctx.is(u)) {
@if(u.engine) {
<div class="warning engine_warning">
<span data-icon="j" class="is4"></span>

View file

@ -12,7 +12,7 @@ sealed trait UserContext {
def isAnon = !isAuth
def is(user: User): Boolean = me ?? (user ==)
def is(user: User): Boolean = me contains user
def userId = me.map(_.id)