@@ -141,7 +141,6 @@ export interface DirectorScreenTrackedProps {
141141 nextShowStyleBaseId : ShowStyleBaseId | undefined
142142 showStyleBaseIds : ShowStyleBaseId [ ]
143143 rundownIds : RundownId [ ]
144- partInstanceToCountTimeFrom : PartInstance | undefined
145144}
146145
147146function getShowStyleBaseIdSegmentPartUi (
@@ -270,7 +269,6 @@ const getDirectorScreenReactive = (props: DirectorScreenProps): DirectorScreenTr
270269 let nextSegment : SegmentUi | undefined = undefined
271270 let nextPartInstanceUi : PartUi | undefined = undefined
272271 let nextShowStyleBaseId : ShowStyleBaseId | undefined = undefined
273- let partInstanceToCountTimeFromUi : PartInstance | undefined = undefined
274272
275273 if ( playlist ) {
276274 rundowns = RundownPlaylistCollectionUtil . getRundownsOrdered ( playlist )
@@ -283,10 +281,7 @@ const getDirectorScreenReactive = (props: DirectorScreenProps): DirectorScreenTr
283281 }
284282
285283 showStyleBaseIds = rundowns . map ( ( rundown ) => rundown . showStyleBaseId )
286- const { currentPartInstance, nextPartInstance, partInstanceToCountTimeFrom } =
287- RundownPlaylistClientUtil . getSelectedPartInstances ( playlist )
288-
289- partInstanceToCountTimeFromUi = partInstanceToCountTimeFrom
284+ const { currentPartInstance, nextPartInstance } = RundownPlaylistClientUtil . getSelectedPartInstances ( playlist )
290285
291286 const partInstance = currentPartInstance ?? nextPartInstance
292287 if ( partInstance ) {
@@ -356,7 +351,6 @@ const getDirectorScreenReactive = (props: DirectorScreenProps): DirectorScreenTr
356351 nextSegment,
357352 nextPartInstance : nextPartInstanceUi ,
358353 nextShowStyleBaseId,
359- partInstanceToCountTimeFrom : partInstanceToCountTimeFromUi ,
360354 }
361355}
362356
@@ -380,6 +374,7 @@ function useDirectorScreenSubscriptions(props: DirectorScreenProps): void {
380374
381375 useSubscription ( CorelibPubSub . segments , rundownIds , { } )
382376 useSubscription ( CorelibPubSub . parts , rundownIds , null )
377+ useSubscription ( MeteorPubSub . uiParts , playlist ?. _id ?? null )
383378 useSubscription ( MeteorPubSub . uiPartInstances , playlist ?. activationId ?? null )
384379 useSubscriptions (
385380 MeteorPubSub . uiShowStyleBase ,
@@ -388,11 +383,7 @@ function useDirectorScreenSubscriptions(props: DirectorScreenProps): void {
388383 useSubscription ( CorelibPubSub . showStyleVariants , null , showStyleVariantIds )
389384 useSubscription ( MeteorPubSub . rundownLayouts , showStyleBaseIds )
390385
391- const {
392- currentPartInstance,
393- nextPartInstance,
394- partInstanceToCountTimeFrom : firstTakenPartInstance ,
395- } = useTracker (
386+ const { currentPartInstance, nextPartInstance } = useTracker (
396387 ( ) => {
397388 const playlist = RundownPlaylists . findOne ( props . playlistId , {
398389 fields : {
@@ -410,7 +401,6 @@ function useDirectorScreenSubscriptions(props: DirectorScreenProps): void {
410401 currentPartInstance : undefined ,
411402 nextPartInstance : undefined ,
412403 previousPartInstance : undefined ,
413- partInstanceToCountTimeFrom : undefined ,
414404 }
415405 }
416406 } ,
@@ -419,14 +409,12 @@ function useDirectorScreenSubscriptions(props: DirectorScreenProps): void {
419409 currentPartInstance : undefined ,
420410 nextPartInstance : undefined ,
421411 previousPartInstance : undefined ,
422- partInstanceToCountTimeFrom : undefined ,
423412 }
424413 )
425414
426415 useSubscriptions ( CorelibPubSub . pieceInstances , [
427416 currentPartInstance && [ [ currentPartInstance . rundownId ] , [ currentPartInstance . _id ] , { } ] ,
428417 nextPartInstance && [ [ nextPartInstance . rundownId ] , [ nextPartInstance . _id ] , { } ] ,
429- firstTakenPartInstance && [ [ firstTakenPartInstance . rundownId ] , [ firstTakenPartInstance . _id ] , { } ] ,
430418 ] )
431419}
432420
@@ -448,7 +436,6 @@ function DirectorScreenRender({
448436 nextPartInstance,
449437 nextSegment,
450438 rundownIds,
451- partInstanceToCountTimeFrom,
452439} : Readonly < DirectorScreenProps & DirectorScreenTrackedProps > ) {
453440 useSetDocumentClass ( 'dark' , 'xdark' )
454441 const { t } = useTranslation ( )
@@ -575,7 +562,7 @@ function DirectorScreenRender({
575562
576563 return (
577564 < div className = "director-screen" >
578- < DirectorScreenTop partInstanceToCountTimeFrom = { partInstanceToCountTimeFrom } playlist = { playlist } />
565+ < DirectorScreenTop playlist = { playlist } />
579566 < div className = "director-screen__body" >
580567 {
581568 // Current Part:
0 commit comments