feat(places): All saved shows each place once, All places shows its count

A place saved into several lists from the same trip place showed once per
list in All saved and counted that often, while All places groups the
copies as one place. All saved now shows such a place once, the first
copy read standing for it, and the rail counts All saved and All places
the way All places groups them, on the desktop and the phone.
This commit is contained in:
Maurice
2026-11-30 13:09:01 +01:00
parent b36b83a32e
commit 2204e851fa
11 changed files with 193 additions and 11 deletions
@@ -24,6 +24,8 @@ interface MCollListNavProps {
/** "All places" (PLC-07) is open; it sits above the saved places. */
library?: boolean;
onSelectLibrary?: () => void;
/** How many places All places holds, each once; null while unknown. */
libraryCount?: number | null;
allSaved: boolean;
activeId: number | typeof ALL_SAVED | null;
onSelect: (id: number | typeof ALL_SAVED) => void;
@@ -41,6 +43,7 @@ export default function MCollListNav({
lists,
library = false,
onSelectLibrary,
libraryCount = null,
allSaved,
activeId,
onSelect,
@@ -60,6 +63,11 @@ export default function MCollListNav({
>
<Globe2 size={15} strokeWidth={2} className="flex-none" />
<span className="min-w-0 flex-1 truncate">{t('collections.library.title')}</span>
{libraryCount != null && libraryCount > 0 && (
<span className="font-geist text-[length:calc(11px*var(--fs-scale-caption,1))] font-bold text-m-faint">
{libraryCount}
</span>
)}
</button>
)}
<button
@@ -167,6 +167,7 @@ export default function MCollections() {
lists={navLists}
library={c.isLibrary}
onSelectLibrary={() => selectList('library')}
libraryCount={c.libraryCount?.all ?? null}
allSaved={!c.isLibrary && c.isAllSaved}
activeId={c.activeId}
onSelect={selectList}