feat: propper timeuntil calc in countdown view (#1765)

* fix error with is linked to loaded metadata

* pass down metadata

* create expected schedule

* expected start in sub info

* for singel subscribtions

* refactor

* add color to single events

* refactor: clean up subscribtion data

* show schedule and secondray data for single events

* improve subscribtion data display
This commit is contained in:
Alex Christoffer Rasmussen
2025-09-07 21:40:27 +02:00
parent 4385e0b9c9
commit 67e67d6a5d
15 changed files with 272 additions and 209 deletions
@@ -173,7 +173,7 @@ describe('initRundownMetadata()', () => {
isPast: false,
isNextDay: false,
totalGap: 10,
isLinkedToLoaded: false,
isLinkedToLoaded: true,
isLoaded: true,
groupId: 'group',
groupColour: 'red',
@@ -125,6 +125,7 @@ function processEntry(
if (entry.id === selectedEventId) {
processedData.isLoaded = true;
processedData.isPast = false;
processedData.isLinkedToLoaded = true;
}
if (isOntimeGroup(entry)) {
@@ -158,7 +159,8 @@ function processEntry(
* a) find an unlinked event
* b) find a countToEnd event
*/
processedData.isLinkedToLoaded = entry.linkStart && !processedData.previousEvent?.countToEnd;
processedData.isLinkedToLoaded =
entry.linkStart && !processedData.previousEvent?.countToEnd && processedData.isLinkedToLoaded;
}
if (isNewLatest(entry, processedData.latestEvent)) {