From fb41de695c8f4a288c38f8cea02b178c91fc13f7 Mon Sep 17 00:00:00 2001 From: Nikita Galaiko Date: Wed, 19 Apr 2023 16:06:26 +0200 Subject: [PATCH] calculate session files based on deltas --- .../[projectId]/player/[date]/[sessionId]/+page.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/routes/projects/[projectId]/player/[date]/[sessionId]/+page.svelte b/src/routes/projects/[projectId]/player/[date]/[sessionId]/+page.svelte index 1b69e04b2..b3f607d19 100644 --- a/src/routes/projects/[projectId]/player/[date]/[sessionId]/+page.svelte +++ b/src/routes/projects/[projectId]/player/[date]/[sessionId]/+page.svelte @@ -286,6 +286,7 @@ > {#each $richSessions as session} {@const isCurrent = session.id === $currentSessionId} + {@const filesChagned = new Set(session.deltas.map(([path]) => path)).size}
  • - {Object.keys(session.files).length} - {Object.keys(session.files).length > 1 ? 'files' : 'file'} + {filesChagned} + {filesChagned !== 1 ? 'files' : 'file'} {#if isCurrent}