fix "equals" of Ysername

This commit is contained in:
InsanusMokrassar committed 2019-02-18 12:53:01 +08:00
1 parent 45ba325f1b
commit 0009d211bc
1 file changed
+4 -3
@@ -29,9 +29,10 @@ data class Username(
}
override fun equals(other: Any?): Boolean {
return super.equals(other) || other ?.let {
super.equals("@$it")
} ?: false
return super.equals(other) || when (other) {
is String -> super.equals("@$other")
else -> false
}
}
}