Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: poll only in large room #1997

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: poll only in large room
raviteja83 committed Sep 28, 2023
commit 84591a898b79f6fe2c555b534871c5706c154cd8
Original file line number Diff line number Diff line change
@@ -50,15 +50,15 @@ export const RoleAccordion = ({
const isOffStageRole = roleName && offStageRoles.includes(roleName);

useEffect(() => {
if (!isOffStageRole) {
if (!isOffStageRole || !isLargeRoom) {
return;
}
loadPeers();
const interval = setInterval(() => {
loadPeers();
}, ITER_TIMER);
return () => clearInterval(interval);
}, [isOffStageRole]); //eslint-disable-line
}, [isOffStageRole, isLargeRoom]); //eslint-disable-line

if (!showAcordion || (isHandRaisedAccordion && filter?.search) || (peerList.length === 0 && filter?.search)) {
return null;