Commit db83d5a0 authored by André Espaze's avatar André Espaze
Browse files

Best 20 first series and nothing below 2 chars

parent e27d58e2c242
......@@ -60,7 +60,11 @@ update msg model =
( x, Cmd.none )
fuzzyMatch xm xs =
List.sortBy (\x -> match [] [] xm x |> .score) xs
if String.length xm < 2 then
[]
else
List.sortBy (\x -> match [] [] xm x |> .score) xs |> List.take 20
in
case msg of
CatalogReceived (Ok x) ->
......@@ -68,7 +72,7 @@ update msg model =
series =
Dict.keys x
in
newModel { model | series = series, searchedSeries = series }
newModel { model | series = series }
CatalogReceived (Err _) ->
newModel { model | status = Just "Error on CatalogReceived" }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment