Count the whole library in "All photographs" whatever is scoped (#76)
The sidebar's "All photographs" row was bound to library-total, which is the scope's count: the header's "412 images" and the scrollbar's size. Under a collection, and now under an album, the row read as the album's size — 4 where the library holds 70. It reads a separate library-whole-total now: the same number as the scope's when nothing is scoped (no second count), and otherwise the unscoped count under the same filter, read only when the view's facts move, so scrolling inside an album does not recount the library.
This commit is contained in:
@@ -1404,7 +1404,7 @@ in property <bool> panel-visible: true;
|
||||
height: 100%;
|
||||
rows: Collections.collection-rows;
|
||||
selected-id: root.collection-selected;
|
||||
total-images: Library.library-total;
|
||||
total-images: Library.library-whole-total;
|
||||
error: Collections.collection-error;
|
||||
|
||||
// TRACES: FR-NC-6a
|
||||
|
||||
@@ -500,6 +500,11 @@ export struct LibraryCell {
|
||||
export global Library {
|
||||
in-out property <[LibraryCell]> library-cells;
|
||||
in property <int> library-total: 0;
|
||||
/// The whole library under the current filter, whatever the grid is
|
||||
/// narrowed to — what the sidebar's "All photographs" row counts.
|
||||
/// `library-total` is the scope's, which under a collection or an album
|
||||
/// made that row read as the album's size.
|
||||
in property <int> library-whole-total: 0;
|
||||
// Narrows the grid to images whose RAW is stored locally — the ones that
|
||||
// can actually be opened while offline. Off by default: the catalog is the
|
||||
// library, and hiding most of it the moment a connection drops would read
|
||||
|
||||
Reference in New Issue
Block a user