Skip to content

Commit

Permalink
fix: action triggers editor not showing previews
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Nov 1, 2024
1 parent 13b3379 commit 8fe7557
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions meteor/server/publications/partsUI/publication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,15 @@ export async function manipulateUIPartsPublicationData(
meteorCustomPublish(
MeteorPubSub.uiParts,
CustomCollectionName.UIParts,
async function (pub, playlistId: RundownPlaylistId) {
async function (pub, playlistId: RundownPlaylistId | null) {
check(playlistId, String)

const credentials = await resolveCredentials({ userId: this.userId, token: undefined })

if (
!credentials ||
NoSecurityReadAccess.any() ||
(await RundownPlaylistReadAccess.rundownPlaylistContent(playlistId, credentials))
(playlistId && (await RundownPlaylistReadAccess.rundownPlaylistContent(playlistId, credentials)))
) {
await setUpCollectionOptimizedObserver<
Omit<DBPart, PartOmitedFields>,
Expand Down
2 changes: 1 addition & 1 deletion packages/meteor-lib/src/api/pubsub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export interface MeteorPubSubTypes {
bucketId: BucketId
) => CustomCollectionName.UIBucketContentStatuses
[MeteorPubSub.uiBlueprintUpgradeStatuses]: () => CustomCollectionName.UIBlueprintUpgradeStatuses
[MeteorPubSub.uiParts]: (playlistId: RundownPlaylistId) => CustomCollectionName.UIParts
[MeteorPubSub.uiParts]: (playlistId: RundownPlaylistId | null) => CustomCollectionName.UIParts
[MeteorPubSub.uiPartInstances]: (
playlistActivationId: RundownPlaylistActivationId | null
) => CustomCollectionName.UIPartInstances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export const TriggeredActionEntry: React.FC<IProps> = React.memo(function Trigge
}
return [] as IWrappedAdLib[]
},
[selected, resolvedActions, sourceLayers],
[selected, resolvedActions, sourceLayers, previewContext],
[] as IWrappedAdLib[]
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export const TriggeredActionsEditor: React.FC<IProps> = function TriggeredAction
)

useSubscription(MeteorPubSub.uiPartInstances, rundownPlaylist?.activationId ?? null)
useSubscription(CorelibPubSub.parts, rundown ? [rundown._id] : [], null)
useSubscription(MeteorPubSub.uiParts, rundownPlaylist?._id ?? null)

const previewContext = useTracker(
() => {
Expand Down

0 comments on commit 8fe7557

Please sign in to comment.