Skip to content

Commit

Permalink
Aligns default note comparator to NIP-01's created at descending and …
Browse files Browse the repository at this point in the history
…then by id ascending
  • Loading branch information
vitorpamplona committed Aug 7, 2024
1 parent 263df0c commit 6f59097
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -36,8 +36,4 @@ val DefaultFeedOrder: Comparator<Note> =
null
}
}
},
{
it.idHex
},
).reversed()
}.thenBy { it.idHex }

0 comments on commit 6f59097

Please sign in to comment.