Merge pull request #19412 from KDSBrowne/v3.multiUserBug
Fix: Multi-User Drawing Issue When Presenter Switches Pages
This commit is contained in:
commit
a12da64e28
@ -33,7 +33,11 @@ const PresentationContainer = (props) => {
|
||||
const currentPresentationPage = presentationPageArray && presentationPageArray[0];
|
||||
const slideSvgUrl = currentPresentationPage && currentPresentationPage.svgUrl;
|
||||
|
||||
const { data: whiteboardWritersData } = useSubscription(CURRENT_PAGE_WRITERS_SUBSCRIPTION);
|
||||
const { data: whiteboardWritersData } = useSubscription(CURRENT_PAGE_WRITERS_SUBSCRIPTION, {
|
||||
variables: { pageId: currentPresentationPage?.pageId },
|
||||
skip: !currentPresentationPage?.pageId,
|
||||
});
|
||||
|
||||
const whiteboardWriters = whiteboardWritersData?.pres_page_writers || [];
|
||||
|
||||
const [presentationSetZoom] = useMutation(PRESENTATION_SET_ZOOM);
|
||||
|
@ -59,7 +59,10 @@ const WhiteboardContainer = (props) => {
|
||||
const curPageId = currentPresentationPage?.num;
|
||||
const presentationId = currentPresentationPage?.presentationId;
|
||||
|
||||
const { data: whiteboardWritersData } = useSubscription(CURRENT_PAGE_WRITERS_SUBSCRIPTION);
|
||||
const { data: whiteboardWritersData } = useSubscription(CURRENT_PAGE_WRITERS_SUBSCRIPTION, {
|
||||
variables: { pageId: currentPresentationPage?.pageId },
|
||||
skip: !currentPresentationPage?.pageId,
|
||||
});
|
||||
const whiteboardWriters = whiteboardWritersData?.pres_page_writers || [];
|
||||
const hasWBAccess = whiteboardWriters?.some((writer) => writer.userId === Auth.userID);
|
||||
|
||||
|
@ -97,11 +97,13 @@ export const CURRENT_PAGE_ANNOTATIONS_STREAM = gql`subscription annotationsStrea
|
||||
}
|
||||
}`;
|
||||
|
||||
export const CURRENT_PAGE_WRITERS_SUBSCRIPTION = gql`subscription currentPageWritersSubscription {
|
||||
pres_page_writers {
|
||||
export const CURRENT_PAGE_WRITERS_SUBSCRIPTION = gql`
|
||||
subscription currentPageWritersSubscription($pageId: String!) {
|
||||
pres_page_writers(where: { pageId: { _eq: $pageId } }) {
|
||||
userId
|
||||
}
|
||||
}`;
|
||||
}
|
||||
`;
|
||||
|
||||
export const CURRENT_PAGE_WRITERS_QUERY = gql`query currentPageWritersQuery {
|
||||
pres_page_writers {
|
||||
|
Loading…
Reference in New Issue
Block a user