mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-10-10 01:12:32 +02:00
Aligns default note comparator to NIP-01's created at descending and then by id ascending
This commit is contained in:
@@ -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()
|
|
||||||
|
Reference in New Issue
Block a user