diff --git a/src/lib/components/CalendarList.svelte b/src/lib/components/CalendarList.svelte index 24d3167f..86afb549 100644 --- a/src/lib/components/CalendarList.svelte +++ b/src/lib/components/CalendarList.svelte @@ -9,6 +9,21 @@ export let entry; export let bundle; export let event = null; + + for (let i = 0; i < segments.length; i++) { + const sg = segments[i] + if (sg.remote) { + console.log(i) + const event = bundle.events.find(e => e.id === sg.remote) + const remoteSegments = event.segments.map(rs => Object.assign(rs, { + event, + remote: true + })) + segments.splice(i, remoteSegments.length, ...remoteSegments) + } + } + console.log(segments) +