Skip to content

Commit

Permalink
checkboxes: Use seq instead of list
Browse files Browse the repository at this point in the history
  • Loading branch information
voodoos committed Aug 20, 2024
1 parent f682b34 commit 55e63e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bin/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ let app =
let sort = Db.View.Sort.of_string s in
let open Fut.Result_syntax in
Console.debug [ "Request changed" ];
Db.View.(req Audio ~src_views:(Only l) ~sort ?filters ()))
Db.View.(
req Audio ~src_views:(Only (Lwd_seq.to_list l)) ~sort ?filters ()))
in
let item_count =
Lwd.map request ~f:(fun req -> Worker_client.get_view_item_count req)
Expand Down
2 changes: 1 addition & 1 deletion lib/brr_lwd_ui/forms/field_checkboxes.ml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ let make t =
let elts = Lwd_seq.map (fun (elt, _) -> elt) all in
let value =
Lwd_seq.fold_monoid (fun (_, v) -> Lwd_seq.element v) Lwd_seq.monoid all
|> Lwd_seq.lift |> Lwd_seq.filter_map Fun.id |> Lwd.map ~f:Lwd_seq.to_list
|> Lwd_seq.lift |> Lwd_seq.filter_map Fun.id
in
{ field = Elwd.div [ `S (Lwd_seq.lift elts) ]; value }

Expand Down

0 comments on commit 55e63e2

Please sign in to comment.