simplify identity checks
This commit is contained in:
parent
808cb8c040
commit
3d99998434
|
@ -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>
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue