Fixes issue with the order of same-author events in a thread

This commit is contained in:
Vitor Pamplona
2024-11-18 16:00:48 -05:00
parent 04d6da28af
commit 9e34e9d720

View File

@@ -58,7 +58,7 @@ object ThreadLevelCalculator {
// estimates the min date by replies if it doesn't exist.
val createdAt =
min(
note.createdAt() ?: min(
note.replies.minOfOrNull { it.createdAt() ?: now } ?: now,
note.reactions.values.minOfOrNull { it.minOfOrNull { it.createdAt() ?: now } ?: now } ?: now,
)