kopia lustrzana https://github.com/vitorpamplona/amethyst
Fixing concurrent modification exception in reactions and boosts
rodzic
790dd778bb
commit
5cb6bca224
|
@ -89,11 +89,15 @@ class Note(val idHex: String) {
|
|||
}
|
||||
|
||||
fun isReactedBy(user: User): Boolean {
|
||||
return reactions.any { it.author == user }
|
||||
return synchronized(reactions) {
|
||||
reactions.any { it.author == user }
|
||||
}
|
||||
}
|
||||
|
||||
fun isBoostedBy(user: User): Boolean {
|
||||
return boosts.any { it.author == user }
|
||||
return synchronized(boosts) {
|
||||
boosts.any { it.author == user }
|
||||
}
|
||||
}
|
||||
|
||||
// Observers line up here.
|
||||
|
|
Ładowanie…
Reference in New Issue