diff --git a/bin/main.ml b/bin/main.ml index 07e234b..e599f50 100644 --- a/bin/main.ml +++ b/bin/main.ml @@ -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 []) diff --git a/bin/ui_playlist.ml b/bin/ui_playlist.ml index bbd894f..4946e18 100644 --- a/bin/ui_playlist.ml +++ b/bin/ui_playlist.ml @@ -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) | _, _ -> diff --git a/lib/db/sync.ml b/lib/db/sync.ml index 4d72b9f..04242a7 100644 --- a/lib/db/sync.ml +++ b/lib/db/sync.ml @@ -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 diff --git a/web/main.css b/web/main.css index fe25943..068ae6d 100644 --- a/web/main.css +++ b/web/main.css @@ -61,6 +61,7 @@ body { .lazy-table { display: inline-grid; + align-content: start; box-sizing: border-box; width: 100%; height: 100%;