mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-10-09 21:52:32 +02:00
Compares by reference to simplify code
This commit is contained in:
@@ -194,15 +194,15 @@ open class Note(val idHex: String) {
|
|||||||
|
|
||||||
fun isZappedBy(user: User): Boolean {
|
fun isZappedBy(user: User): Boolean {
|
||||||
// Zaps who the requester was the user
|
// Zaps who the requester was the user
|
||||||
return zaps.any { it.key.author == user }
|
return zaps.any { it.key.author === user }
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isReactedBy(user: User): Boolean {
|
fun isReactedBy(user: User): Boolean {
|
||||||
return reactions.any { it.author == user }
|
return reactions.any { it.author === user }
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isBoostedBy(user: User): Boolean {
|
fun isBoostedBy(user: User): Boolean {
|
||||||
return boosts.any { it.author == user }
|
return boosts.any { it.author === user }
|
||||||
}
|
}
|
||||||
|
|
||||||
fun reportsBy(user: User): Set<Note> {
|
fun reportsBy(user: User): Set<Note> {
|
||||||
|
Reference in New Issue
Block a user