mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-22 15:39:11 +00:00
bugfix: delay calc
This commit is contained in:
@@ -15,7 +15,8 @@ const areEqual = (prevProps, nextProps) => {
|
|||||||
prevProps.data.revision === nextProps.data.revision &&
|
prevProps.data.revision === nextProps.data.revision &&
|
||||||
prevProps.selected === nextProps.selected &&
|
prevProps.selected === nextProps.selected &&
|
||||||
prevProps.next === nextProps.next &&
|
prevProps.next === nextProps.next &&
|
||||||
prevProps.index === nextProps.index
|
prevProps.index === nextProps.index &&
|
||||||
|
prevProps.delay === nextProps.delay
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -128,8 +128,10 @@ export default function EventList(props) {
|
|||||||
ref={provided.innerRef}
|
ref={provided.innerRef}
|
||||||
>
|
>
|
||||||
{events.map((e, index) => {
|
{events.map((e, index) => {
|
||||||
if (e.type === 'delay') cumulativeDelay += e.duration;
|
if (index === 0) cumulativeDelay = 0;
|
||||||
else if (e.type === 'block') cumulativeDelay = 0;
|
if (e.type === 'delay' && e.duration != null) {
|
||||||
|
cumulativeDelay += e.duration;
|
||||||
|
} else if (e.type === 'block') cumulativeDelay = 0;
|
||||||
return (
|
return (
|
||||||
<Fragment key={e.id}>
|
<Fragment key={e.id}>
|
||||||
<EventListItem
|
<EventListItem
|
||||||
|
|||||||
Reference in New Issue
Block a user