Skip to content

Commit

Permalink
Remove stale comments. Small sync and ui tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
voodoos committed Apr 18, 2024
1 parent 3fa5fab commit 18c558d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 2 additions & 4 deletions bin/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,14 @@ let app _idb =
in
let now_playing =
let playlist =
(* let playlist = Lwd.map (Lwd.get playstate.playlist) ~f:(Option.value ~default: ) *)
Lwd.map (Lwd.get Player.playstate.playlist) ~f:(function
| None -> Elwd.span [ `P (El.txt' "Nothing playing") ]
| Some playlist ->
Ui_playlist.make ~reset_playlist:P.reset_playlist ~fetch player
(Lwd.pure (Fut.ok playlist))
(* FIXME that's awful use of lwd*))
(Lwd.pure (Fut.ok playlist)))
in
(*todo: do we need that join ?*)
Elwd.div [ `R (Lwd.join playlist) ]
Lwd.join playlist
in
Elwd.div
~at:Brr_lwd_ui.Attrs.(to_at ~id:"main-layout" @@ classes [])
Expand Down
5 changes: 4 additions & 1 deletion bin/ui_playlist.ml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,10 @@ let lazy_table (type data) ~(ui_table : Table.fixed_row_height)
( (0, Lwd_seq.empty, 0),
fun (n, s, m) (p, s', q) ->
match (Lwd_seq.view s, Lwd_seq.view s') with
| Empty, Empty -> (n + m + p + q, s, 0)
| Empty, Empty ->
(* Since s is empty it does not matter on which
"side" of it the spaces are accumulated. *)
(n + m + p + q, s, 0)
| Empty, _ -> (n + m + p, s', q)
| _, Empty -> (n, s, m + p + q)
| _, _ ->
Expand Down
2 changes: 1 addition & 1 deletion lib/db/sync.ml
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ let sync ?(report = fun _ -> ()) ~(source : Source.connexion) idb =
in
enqueue ~start_index:first total;
let total_queries = Queue.length fetch_queue in
let rec run_queue ?(threads = 2) q =
let rec run_queue ?(threads = 1) q =
assert (threads > 0);
let rec take_n acc n =
if n = 0 then List.rev acc
Expand Down
1 change: 1 addition & 0 deletions web/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ body {

.lazy-table {
display: inline-grid;
align-content: start;
box-sizing: border-box;
width: 100%;
height: 100%;
Expand Down

0 comments on commit 18c558d

Please sign in to comment.