mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-04-08 11:58:03 +02:00
Aligns default note comparator to NIP-01's created at descending and then by id ascending
This commit is contained in:
parent
263df0c895
commit
6f59097ac0
@ -24,7 +24,7 @@ import com.vitorpamplona.amethyst.model.Note
|
||||
import com.vitorpamplona.quartz.events.Event
|
||||
|
||||
val DefaultFeedOrder: Comparator<Note> =
|
||||
compareBy<Note>(
|
||||
compareByDescending<Note>
|
||||
{
|
||||
val noteEvent = it.event
|
||||
if (noteEvent == null) {
|
||||
@ -36,8 +36,4 @@ val DefaultFeedOrder: Comparator<Note> =
|
||||
null
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
it.idHex
|
||||
},
|
||||
).reversed()
|
||||
}.thenBy { it.idHex }
|
||||
|
Loading…
x
Reference in New Issue
Block a user