mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-08 17:03:53 +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.selected === nextProps.selected &&
|
||||
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}
|
||||
>
|
||||
{events.map((e, index) => {
|
||||
if (e.type === 'delay') cumulativeDelay += e.duration;
|
||||
else if (e.type === 'block') cumulativeDelay = 0;
|
||||
if (index === 0) cumulativeDelay = 0;
|
||||
if (e.type === 'delay' && e.duration != null) {
|
||||
cumulativeDelay += e.duration;
|
||||
} else if (e.type === 'block') cumulativeDelay = 0;
|
||||
return (
|
||||
<Fragment key={e.id}>
|
||||
<EventListItem
|
||||
|
||||
Reference in New Issue
Block a user