mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-10-02 19:53:14 +02:00
Refactoring Note's hasReports function
This commit is contained in:
@@ -239,9 +239,9 @@ open class Note(val idHex: String) {
|
||||
val dayAgo = Date().time / 1000 - 24 * 60 * 60
|
||||
return reports.isNotEmpty() ||
|
||||
(
|
||||
author?.reports?.values?.filter {
|
||||
author?.reports?.values?.any {
|
||||
it.firstOrNull { (it.createdAt() ?: 0) > dayAgo } != null
|
||||
}?.isNotEmpty() ?: false
|
||||
} ?: false
|
||||
)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user