Relevant characters sub-sorted by likes now
This commit is contained in:
parent
fe33054f31
commit
e08f4c2f09
@ -75,9 +75,16 @@ func Get(ctx *aero.Context) string {
|
||||
bRelevance := characterAppearances[relevantCharacters[j].ID]
|
||||
|
||||
if aRelevance == bRelevance {
|
||||
aLikes := len(relevantCharacters[i].Likes)
|
||||
bLikes := len(relevantCharacters[j].Likes)
|
||||
|
||||
if aLikes == bLikes {
|
||||
return relevantCharacters[i].Name.Canonical < relevantCharacters[j].Name.Canonical
|
||||
}
|
||||
|
||||
return aLikes > bLikes
|
||||
}
|
||||
|
||||
return aRelevance > bRelevance
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user