Even better

This commit is contained in:
Thomas Forgione 2022-02-25 11:35:38 +01:00
parent 5d8e380d74
commit b160cc9789
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ modelEmojis model =
Search s -> Search s ->
Emoji.categories Emoji.categories
|> List.map Emoji.getEmojis |> List.map Emoji.getEmojis
|> List.map (List.filter (\x -> String.contains s x.name)) |> List.map (List.filter (\x -> String.contains s x.name || List.any (String.contains s) x.tags))
|> doubleMap (\x -> ( x, distance s x.name )) |> doubleMap (\x -> ( x, distance s x.name ))
|> List.map (List.sortBy Tuple.second) |> List.map (List.sortBy Tuple.second)
|> mergeBy Tuple.second |> mergeBy Tuple.second