Aligns default note comparator to NIP-01's created at descending and then by id ascending

This commit is contained in:
Vitor Pamplona
2024-08-07 15:44:35 -04:00
parent 263df0c895
commit 6f59097ac0

View File

@@ -24,7 +24,7 @@ import com.vitorpamplona.amethyst.model.Note
import com.vitorpamplona.quartz.events.Event import com.vitorpamplona.quartz.events.Event
val DefaultFeedOrder: Comparator<Note> = val DefaultFeedOrder: Comparator<Note> =
compareBy<Note>( compareByDescending<Note>
{ {
val noteEvent = it.event val noteEvent = it.event
if (noteEvent == null) { if (noteEvent == null) {
@@ -36,8 +36,4 @@ val DefaultFeedOrder: Comparator<Note> =
null null
} }
} }
}, }.thenBy { it.idHex }
{
it.idHex
},
).reversed()