Skip to content

Commit

Permalink
fix: labels in multiview got overwritten by source-name
Browse files Browse the repository at this point in the history
  • Loading branch information
malmen237 committed Nov 6, 2024
1 parent c297c57 commit 193ac11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api/ateliereLive/pipelines/streams/streams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export async function createStream(
};
}
const updatedViewsForSource = viewsForSource.map((v) => {
return { ...v, label: source.name };
return { ...v, label: v.label || source.name };
});

const updatedViews = [
Expand Down
5 changes: 4 additions & 1 deletion src/hooks/useUpdateSourceInputSlotOnMultiviewLayouts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ export function useUpdateSourceInputSlotOnMultiviewLayouts(): CallbackHook<
)?.label;

if ((view.id && view.id.length < 5) || preview || program) {
return view;
return {
...view,
label: isUpdatedLabel || view.label
};
} else if (isUpdatedInputSlot || isSameInputSlot) {
return {
...view,
Expand Down

0 comments on commit 193ac11

Please sign in to comment.